]> git.lyx.org Git - features.git/commitdiff
Handle comments in options
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 22 Feb 2018 10:24:43 +0000 (11:24 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 22 Feb 2018 10:24:43 +0000 (11:24 +0100)
Things like
pdfpagemode=UseOutlines%None,UseOutlines,UseThumbs,FullScreen

was not imported correctly (the comment was not stripped)

Fixes the rest of #5737

src/tex2lyx/Preamble.cpp

index fe722f48e27a6503590319c30a43697be2f2ef65..8aa9e64ca2468c74e8e03a0116e49b23737b7c1d 100644 (file)
@@ -259,7 +259,7 @@ vector<string> split_options(string const & input)
                        p.skip_spaces(true);
                        if (p.next_token().asInput() == "{")
                                option += '{' + p.getArg('{', '}') + '}';
-               } else if (t.cat() != catSpace)
+               } else if (t.cat() != catSpace && t.cat() != catComment)
                        option += t.asInput();
        }
 
@@ -553,7 +553,7 @@ Preamble::Preamble() : one_language(true), explicit_babel(false),
        h_use_geometry            = "false";
        h_use_default_options     = "false";
        h_use_hyperref            = "false";
-       h_use_microtype           = "false";
+       h_use_microtype           = "false";
        h_use_refstyle            = false;
        h_use_minted              = false;
        h_use_packages["amsmath"]    = "1";