mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
DocBook: fix font issues when a paragraph has an InsetNewline.
This commit is contained in:
parent
7a1b82a16a
commit
9d3a717ef1
@ -4,9 +4,10 @@
|
||||
<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
|
||||
<info>
|
||||
<title>Title</title>
|
||||
<author><personname>Author</personname></author>
|
||||
<author>
|
||||
<personname>Author</personname>
|
||||
</author>
|
||||
<date>Date</date>
|
||||
</info>
|
||||
<para>Content</para>
|
||||
|
||||
</article>
|
@ -7,22 +7,19 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>LyX:</term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para />
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>lyx16</term>
|
||||
|
||||
<listitem>
|
||||
<para>LyX 1.6 file format (lyx2lyx)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>lyx21</term>
|
||||
|
||||
<listitem>
|
||||
<para> </para>
|
||||
<para />
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
@ -30,27 +27,23 @@
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>LyX:</term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<para />
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>lyx16</term>
|
||||
|
||||
<listitem>
|
||||
<para>LyX 1.6 file format (lyx2lyx)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>lyx21</term>
|
||||
|
||||
<listitem>
|
||||
<para> </para>
|
||||
<para />
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</article>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This DocBook file was created by LyX 2.4.0dev
|
||||
See http://www.lyx.org/ for more information -->
|
||||
<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.1">
|
||||
<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
|
||||
<title>Test document</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
@ -9,5 +9,4 @@
|
||||
<para>Content.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</article>
|
@ -3358,12 +3358,15 @@ std::vector<docstring> Paragraph::simpleDocBookOnePar(Buffer const & buf,
|
||||
if (isDeleted(i))
|
||||
continue;
|
||||
|
||||
// If this is an InsetNewline, generate a new paragraph.
|
||||
// If this is an InsetNewline, generate a new paragraph. Also reset the fonts, so that tags are closed in
|
||||
// this paragraph.
|
||||
if (getInset(i) != nullptr && getInset(i)->lyxCode() == NEWLINE_CODE) {
|
||||
xs->closeFontTags();
|
||||
generatedParagraphs.push_back(os.str());
|
||||
os = odocstringstream();
|
||||
delete xs;
|
||||
xs = new XMLStream(os);
|
||||
font_old = outerfont.fontInfo();
|
||||
}
|
||||
|
||||
// Determine which tags should be opened or closed.
|
||||
|
Loading…
Reference in New Issue
Block a user