The branch, feature/docbook, has been updated. - Log -----------------------------------------------------------------
commit 03c09bc16dee0dad2eefb14e81eadac9cb3feb2f Author: Thibaut Cuvelier <[email protected]> Date: Wed Sep 16 03:22:38 2020 +0200 XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5. diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 4477886..40ea55c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2217,7 +2217,7 @@ Buffer::ExportStatus Buffer::writeLyXHTMLSource(odocstream & os, if (output_preamble) { os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" - << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN\" \"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd\">\n" + << "<!DOCTYPE html>\n" // FIXME Language should be set properly. << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" << "<head>\n" commit 52216b7323e3532639e5f67959443516fd582a56 Author: Thibaut Cuvelier <[email protected]> Date: Wed Sep 16 03:18:32 2020 +0200 XHTML: remove <section> support. diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index f8cd53e..99d425e 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -590,7 +590,6 @@ void xhtmlParagraphs(Text const & text, ParagraphList::const_iterator const pend = (epit == (int) paragraphs.size()) ? paragraphs.end() : paragraphs.iterator_at(epit); - std::stack<int> headerLevels; while (bpit < epit) { ParagraphList::const_iterator par = paragraphs.iterator_at(bpit); @@ -609,33 +608,6 @@ void xhtmlParagraphs(Text const & text, ParagraphList::const_iterator const lastpar = par; ParagraphList::const_iterator send; - // Think about adding <section> and/or </section>s. - if (style.category() == from_utf8("Sectioning")) { - int level = style.toclevel; - - // Need to close a previous section if it has the same level or a higher one (close <section> if opening a - // <h2> after a <h2>, <h3>, <h4>, <h5> or <h6>). More examples: - // - current: h2; back: h1; do not close any <section> - // - current: h1; back: h2; close two <section> (first the <h2>, then the <h1>, so a new <h1> can come) - while (!headerLevels.empty() && level <= headerLevels.top()) { - // Output the tag only if it corresponds to a legit section. - int stackLevel = headerLevels.top(); - if (stackLevel != Layout::NOT_IN_TOC && level > 1) { // <h1> is the document title. - xs << xml::EndTag("section"); - xs << xml::CR(); - } - headerLevels.pop(); - } - - // Open the new section: first push it onto the stack, then output it in XHTML. - headerLevels.push(level); - // Some sectioning-like elements should not be output (such as FrontMatter). - if (level != Layout::NOT_IN_TOC && level > 1) { // <h1> is the document title. - xs << xml::StartTag("section"); - xs << xml::CR(); - } - } - switch (style.latextype) { case LATEX_COMMAND: { // The files with which we are working never have more than @@ -672,15 +644,6 @@ void xhtmlParagraphs(Text const & text, } bpit += distance(lastpar, par); } - - // 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) { - docstring tag = from_utf8("</section>"); - headerLevels.pop(); - xs << XMLStream::ESCAPE_NONE << tag; - xs << xml::CR(); - } } ----------------------------------------------------------------------- Summary of changes: src/Buffer.cpp | 2 +- src/output_xhtml.cpp | 37 ------------------------------------- 2 files changed, 1 insertions(+), 38 deletions(-) hooks/post-receive -- Repository for new features -- lyx-cvs mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-cvs
