[LyX/master] XML: add a check for a typical case in the xml name space.

Thibaut Cuvelier tcuvelier at lyx.org
Mon Sep 20 23:00:20 UTC 2021


commit 7ee23ca885e80ad014c00999584b239d703de2e4
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Tue Sep 21 01:18:10 2021 +0200

    XML: add a check for a typical case in the xml name space.
    
    IGNORE is a typical placeholder for tags that should not be output, along with NONE. At some point, we should check if both are required, or if NONE is enough…
---
 src/xml.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xml.cpp b/src/xml.cpp
index 2f54feb..7c614da 100644
--- a/src/xml.cpp
+++ b/src/xml.cpp
@@ -836,7 +836,7 @@ void xml::openTag(XMLStream & xs, const std::string & tag, const docstring & att
 
 void xml::closeTag(XMLStream & xs, const docstring & tag, const std::string & tagtype)
 {
-	if (tag.empty() || tag == "NONE")
+	if (tag.empty() || tag == "NONE" || tag == "IGNORE")
 		return;
 
 	if (tag == "para" || tagtype == "paragraph") // Special case for <para>: always considered as a paragraph.


More information about the lyx-cvs mailing list