]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/parser_tools.py
When cleaning up before quitting, take care of exceptions
[lyx.git] / lib / lyx2lyx / parser_tools.py
index 50ad3a5812308d5c08d7db2f823fcad4833d5e9e..d208c06412f129f8676dcf427ef537b5b8c08987 100644 (file)
@@ -64,7 +64,7 @@ get_value(lines, token, start[, end[, default]):
   and is what is returned if we do not find anything. So you
   can use that to set a default.
   
-get_quoted_value(lines, token, start[, end[, default]):
+get_quoted_value(lines, token, start[, end[, default]]):
   Similar to get_value, but it will strip quotes off the
   value, if they are present. So use this one for cases
   where the value is normally quoted.
@@ -74,6 +74,9 @@ get_option_value(line, option):
       option="value"
   and returns value. Returns "" if not found.
 
+get_bool_value(lines, token, start[, end[, default]]):
+  Like get_value, but returns a boolean.
+
 del_token(lines, token, start[, end]):
   Like find_token, but deletes the line if it finds one.
   Returns True if a line got deleted, otherwise False.
@@ -325,7 +328,7 @@ def get_bool_value(lines, token, start, end = 0, default = None):
     False if bool_value is 0 or false
     """
 
-    val = get_value(lines, token, start, end, "")
+    val = get_quoted_value(lines, token, start, end, "")
 
     if val == "1" or val == "true":
         return True