]> git.lyx.org Git - features.git/commitdiff
Fix bug #11780.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 14 Mar 2020 22:31:25 +0000 (18:31 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 14 Mar 2020 23:19:04 +0000 (19:19 -0400)
The preamble snippets are for LaTeX and do not need to be output
with HTML.

(cherry picked from commit f044d3a3595912415806707582e8aa6b0890bbe7)

src/Buffer.cpp
src/LaTeXFeatures.h
status.23x

index 92c3d5d9c7f998e58d84607e737318563aa565ea..4c43acbb6767bacdd32672cc138dc64e90f5e9b1 100644 (file)
@@ -2208,10 +2208,6 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
                if (!styles.empty())
                        os << "\n<!-- Text Class Preamble -->\n" << styles << '\n';
 
-               styles = features.getPreambleSnippets().str;
-               if (!styles.empty())
-                       os << "\n<!-- Preamble Snippets -->\n" << styles << '\n';
-
                // we will collect CSS information in a stream, and then output it
                // either here, as part of the header, or else in a separate file.
                odocstringstream css;
index 85f377130426cd6e7a8356150c3d95b5395c3b53..7353f0c6b6a80ffeea8ded431191c82d47f2bef8 100644 (file)
@@ -95,7 +95,8 @@ public:
        void addPreambleSnippet(docstring const & snippet, bool allowdupes = false);
        ///
        TexString getPreambleSnippets() const;
-       ///
+       /// Adds CSS information for HTML export.
+       /// Note that addPreambleSnippet is for LaTeX-type export
        void addCSSSnippet(std::string const &);
        ///
        docstring getCSSSnippets() const;
index 6b30e90bac01bcba3a042dbb377be7ae47edd97b..3fbb135d68fbf1f7161981e5f7a2510a0496f9a9 100644 (file)
@@ -91,6 +91,7 @@ What's new
 
 * LYXHTML
 
+- Don't output LaTeX preamble snippets with HTML (bug 11780).
 
 
 * ADVANCED FIND AND REPLACE