[LyX features/feature/docbook] XHTML: restore sections.
Thibaut Cuvelier
tcuvelier at lyx.org
Fri Sep 18 00:52:30 UTC 2020
The branch, feature/docbook, has been updated.
discards 507ee6d3c2e4d82429bb9ab0b72a62987e8d1535 (commit)
discards 8a1d0db1075933321ee06926b72b918fd262956e (commit)
discards fb5f2595a94c8a2e4aa4b87a4c78cfe2e74f530f (commit)
discards e0c2060445100c6572544d00d1691e0ee356908c (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 (507ee6d3c2e4d82429bb9ab0b72a62987e8d1535)
\
N -- N -- N (3e5114bdad6976479411ebda0fc32dc641bd69af)
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 3e5114bdad6976479411ebda0fc32dc641bd69af
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 119bc3dff5ff1b384e0106fc17622c243c8e998e
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
commit 6af788cd0afca874a07245d908e880ccd3837d73
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Wed Sep 16 04:02:51 2020 +0200
Converters: slightly more pythonic code.
diff --git a/lib/scripts/convertDefault.py b/lib/scripts/convertDefault.py
index c927713..5287e96 100644
--- a/lib/scripts/convertDefault.py
+++ b/lib/scripts/convertDefault.py
@@ -25,7 +25,7 @@ re_version = re.compile(r'^Version:.*ImageMagick\s*(\d*)\.(\d*)\.(\d*).*$')
command = 'magick'
fout = os.popen('magick -version 2>&1')
output = fout.readline()
-if fout.close() != None:
+if fout.close() is not None:
# older versions
# caution: windows has a convert.exe for converting file systems
command = 'convert'
@@ -39,7 +39,7 @@ version = re_version.match(output)
im = False
gm = False
-if version != None:
+if version is not None:
major = int(version.group(1))
minor = int(version.group(2))
patch = int(version.group(3))
@@ -49,7 +49,7 @@ else:
# Try GraphicsMagick
re_version = re.compile(r'^GraphicsMagick.*http:..www.GraphicsMagick.org.*$')
version = re_version.match(output)
- if version != None:
+ if version is not None:
gm = True
# we need version to be a valid integer 3-tuple
version = (1,0,0)
@@ -72,10 +72,10 @@ if sys.argv[3] == 'ppm' and (im and version >= (6,3,5) or gm):
# print (command, sys.argv[2], sys.argv[4], file= sys.stdout)
if (im or gm) and os.system(r'%s %s "%s" %s "%s"' % (command, sopts, sys.argv[2], topts, sys.argv[3] + ':' + sys.argv[4])) != 0:
- print (sys.argv[0], 'ERROR', file= sys.stderr)
- print ('Execution of "%s" failed.' % command, file= sys.stderr)
+ print(sys.argv[0], 'ERROR', file= sys.stderr)
+ print('Execution of "%s" failed.' % command, file= sys.stderr)
sys.exit(1)
elif not im and not gm and sys.platform == 'darwin' and os.system(r'%s "%s" "%s"' % (command, sys.argv[2], sys.argv[4])) != 0:
- print (sys.argv[0], 'ERROR', file= sys.stderr)
- print ('Execution of "%s" failed.' % command, file= sys.stderr)
+ print(sys.argv[0], 'ERROR', file= sys.stderr)
+ print('Execution of "%s" failed.' % command, file=sys.stderr)
sys.exit(1)
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
hooks/post-receive
--
Repository for new features
More information about the lyx-cvs
mailing list