]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Account for old versions of Pygments
[lyx.git] / src / Font.cpp
index fdab9ba78c190a2f08434c7c9637f12b55d489f1..86ffcd62cd6d65df7a8ba94fcc86c2c24aefa0b8 100644 (file)
@@ -462,6 +462,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
                                  OutputParams const & runparams,
                                  Font const & base,
                                  Font const & next,
+                                 bool & needPar,
                                  bool const & closeLanguage) const
 {
        int count = 0;
@@ -506,6 +507,11 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
        if (f.size() != FONT_SIZE_INHERIT) {
                // We only have to close if only size changed
                if (!env) {
+                       if (needPar && !closeLanguage) {
+                               os << "\\par";
+                               count += 4;
+                               needPar = false;
+                       }
                        os << '}';
                        ++count;
                }