[LyX/master] DocBook: ignore fonts in ERT.

Thibaut Cuvelier tcuvelier at lyx.org
Sat Nov 28 03:45:50 UTC 2020


commit a6cc62f6ee72c5e5c27664160d2cce9ae172063f
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sat Nov 28 05:15:34 2020 +0100

    DocBook: ignore fonts in ERT.
    
    Also, mark a Slides test as passing, because it is valid DocBook (but not really useful).
---
 development/autotests/invertedTests |    3 ++-
 src/insets/InsetERT.cpp             |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests
index 1d6d76c..2b31a71 100644
--- a/development/autotests/invertedTests
+++ b/development/autotests/invertedTests
@@ -530,6 +530,7 @@ Sublabel: docbook poster
 export/.*Poster.*_docbook5
 
 Sublabel: docbook beamer
-# Beamer is not yet implemented.
+# Beamer is not yet implemented. One test passes, but mostly by chance.
+!export/templates/Presentations/Slides_docbook5
 export/(examples|templates)/(de|es|fr|ja|ru)/Presentations/.*_docbook5
 export/(examples|templates)/Presentations/.*_docbook5
diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp
index bdfb227..79ab024 100644
--- a/src/insets/InsetERT.cpp
+++ b/src/insets/InsetERT.cpp
@@ -98,7 +98,7 @@ void InsetERT::docbook(XMLStream & xs, OutputParams const & runparams) const
 	// in an ERT, use simple line breaks.
 	// New line after each paragraph of the ERT, save the last one.
 	while (true) { // For each paragraph in the ERT...
-		auto pars = par->simpleDocBookOnePar(buffer(), runparams, text().outerFont(distance(begin, par)));
+		auto pars = par->simpleDocBookOnePar(buffer(), runparams, text().outerFont(distance(begin, par)), 0, false, true);
 		auto p = pars.begin();
 		while (true) { // For each line of this ERT paragraph...
 			os << *p;
@@ -125,7 +125,6 @@ void InsetERT::docbook(XMLStream & xs, OutputParams const & runparams) const
 	xs << XMLStream::ESCAPE_NONE << "<!-- ";
 	xs << XMLStream::ESCAPE_COMMENTS << os.str();
 	xs << XMLStream::ESCAPE_NONE << " -->";
-	xs << xml::CR();
 }
 
 


More information about the lyx-cvs mailing list