[LyX/2.3.x] Fix bug #11780.
Richard Kimberly Heck
rikiheck at lyx.org
Sat Mar 14 22:59:29 UTC 2020
commit 429d2171b15a6bea964c203a9b22e257e8496278
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Sat Mar 14 18:31:25 2020 -0400
Fix bug #11780.
The preamble snippets are for LaTeX and do not need to be output
with HTML.
(cherry picked from commit f044d3a3595912415806707582e8aa6b0890bbe7)
---
src/Buffer.cpp | 4 ----
src/LaTeXFeatures.h | 3 ++-
status.23x | 1 +
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 92c3d5d..4c43acb 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -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;
diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h
index 85f3771..7353f0c 100644
--- a/src/LaTeXFeatures.h
+++ b/src/LaTeXFeatures.h
@@ -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;
diff --git a/status.23x b/status.23x
index 6b30e90..3fbb135 100644
--- a/status.23x
+++ b/status.23x
@@ -91,6 +91,7 @@ What's new
* LYXHTML
+- Don't output LaTeX preamble snippets with HTML (bug 11780).
* ADVANCED FIND AND REPLACE
More information about the lyx-cvs
mailing list