]> git.lyx.org Git - lyx.git/commitdiff
MathML in HTML: in case of conversion failure, add a comment
authorThibaut Cuvelier <tcuvelier@lyx.org>
Fri, 20 Jan 2023 01:45:20 +0000 (02:45 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Fri, 20 Jan 2023 01:45:35 +0000 (02:45 +0100)
src/mathed/InsetMathHull.cpp

index f043882f53c2995419dde3918c8c78b09418fede..0bb9b8e47bff7419c8a19847f07c4a5f1ff29e2a 100644 (file)
@@ -2648,6 +2648,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
                                xs << xml::CR();
                        xs << xml::EndTag("math") << xml::CR();
                }
+               // In case of failure, generate an image.
        } else if (mathtype == BufferParams::HTML) {
                odocstringstream os;
                HtmlStream ms(os);
@@ -2662,6 +2663,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
                           << os.str()
                           << xml::EndTag(tag);
                }
+               // In case of failure, generate an image.
        }
 
        // what we actually want is this:
@@ -2676,7 +2678,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
        //
        // so this is for Images.
        if (!success && mathtype != BufferParams::LaTeX) {
-               graphics::PreviewImage const * pimage = 0;
+               graphics::PreviewImage const * pimage = nullptr;
                if (!op.dryrun) {
                        loadPreview(docit_);
                        pimage = preview_->getPreviewImage(buffer());