]> 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, 29 Mar 2018 07:42:00 +0000 (09:42 +0200)
Things like
pdfpagemode=UseOutlines%None,UseOutlines,UseThumbs,FullScreen

was not imported correctly (the comment was not stripped)

Fixes the rest of #5737

(cherry picked from commit 820ec38da7ce04ec95b1a8e1e2d1aa9b7d0762fb)

src/tex2lyx/Preamble.cpp
status.23x

index 26824ddcd2719e784b1a8a0e2728593b726c95aa..436c961545ce3635c6a39d29972fc8dc1fab448c 100644 (file)
@@ -281,7 +281,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();
        }
 
@@ -584,7 +584,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";
index f0bcc2d275b2ebdf62b2617da036125264c30605..a8e29318c33eec129b2993a7cd9d4939f313634b 100644 (file)
@@ -152,6 +152,8 @@ What's new
 
 - Fix parsing issue in nested CJK (bug 9562).
 
+- Fix import of package options with comments (bug 5737).
+
 
 * ADVANCED FIND AND REPLACE