[LyX features/feature/docbook] XHTML: restore sections.

Thibaut Cuvelier tcuvelier at lyx.org
Fri Sep 18 00:46:56 UTC 2020


The branch, feature/docbook, has been updated.
  discards  34769eb2f96517a3c09b5b8a9258e81b06d24e0d (commit)
  discards  b783fb811c92c54f81952c0df1a7133b4eab9bf5 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (34769eb2f96517a3c09b5b8a9258e81b06d24e0d)
            \
             N -- N -- N (507ee6d3c2e4d82429bb9ab0b72a62987e8d1535)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -----------------------------------------------------------------

commit 507ee6d3c2e4d82429bb9ab0b72a62987e8d1535
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Wed Sep 16 04:13:42 2020 +0200

    XHTML: restore sections.

diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index f8cd53e..fe396f8 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -675,7 +675,7 @@ void xhtmlParagraphs(Text const & text,
 
 	// If need be, close <section>s, but only at the end of the document (otherwise, dealt with at the beginning
 	// of the loop).
-	while (!headerLevels.empty() && headerLevels.top() > Layout::NOT_IN_TOC) {
+	while (!headerLevels.empty() && headerLevels.top() != Layout::NOT_IN_TOC && headerLevels.top() > 1) {
 		docstring tag = from_utf8("</section>");
 		headerLevels.pop();
 		xs << XMLStream::ESCAPE_NONE << tag;

commit 8a1d0db1075933321ee06926b72b918fd262956e
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Wed Sep 16 04:12:26 2020 +0200

    Converters: always set version to something.
    
    Otherwise, it's common to compare "None >= (6,2,6)", which makes no sense. Set it to (0,0,0) so that any comparison fails (without an error message).

diff --git a/lib/scripts/convertDefault.py b/lib/scripts/convertDefault.py
index 5287e96..d04fa78 100644
--- a/lib/scripts/convertDefault.py
+++ b/lib/scripts/convertDefault.py
@@ -53,6 +53,8 @@ else:
         gm = True
         # we need version to be a valid integer 3-tuple
         version = (1,0,0)
+    else:
+        version = (0,0,0)
 
 # IM >= 5.5.8 separates options for source and target files
 # See http://www.imagemagick.org/Usage/basics/#why

-----------------------------------------------------------------------

Summary of changes:
 lib/scripts/convertDefault.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Repository for new features


More information about the lyx-cvs mailing list