]> git.lyx.org Git - features.git/commitdiff
Strip % characters from nomenclWidest()
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 14 Jan 2021 07:55:15 +0000 (08:55 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 14 Jan 2021 07:55:15 +0000 (08:55 +0100)
This character now (oddly) serves as escape char in newer nomencl versions
but it still comments out in all other contexts.

See #10634

src/insets/InsetNomencl.cpp

index b0d678dded866a66e1a0b58ac6da46adfa73ebc1..9fd91cfca0ea65263c399928e7ccb73a4aa3b433 100644 (file)
@@ -393,10 +393,13 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams)
                                continue;
                        nomencl = static_cast<InsetNomencl const *>(inset);
                        // Use proper formatting. We do not escape makeindex chars here
-                       docstring const symbol = nomencl ?
+                       docstring symbol = nomencl ?
                                nomencl->params().prepareCommand(runparams, nomencl->getParam("symbol"),
                                                        ParamInfo::HANDLING_LATEXIFY)
                                : docstring();
+                       // strip out % characters which are used as escape in nomencl
+                       // but act as comment in out context hereĀ“
+                       symbol = subst(symbol, from_ascii("%"), docstring());
                        // This is only an approximation,
                        // but the best we can get.
                        int const wx = use_gui ?