QString HtmlTemplate::exportAsHtml(const QString &header, const QString &body, RenderOptions options) const { // clear code highlighting option since it depends on the resource file options &= ~Template::CodeHighlighting; return renderAsHtml(header, body, options); }
QString HtmlTemplate::render(const QString &body, RenderOptions options) const { // add scrollbar synchronization options |= Template::ScrollbarSynchronization; return renderAsHtml(QString(), body, options); }
QString HtmlTemplate::render(const QString &body, RenderOptions options) const { // add scrollbar synchronization options |= Template::ScrollbarSynchronization; QString htmlBody(body); // Mermaid and highlighting.js don't work nicely together // So we need to replace the <code> section by a <div> section if (options.testFlag(Template::CodeHighlighting) && options.testFlag(Template::DiagramSupport)) { convertDiagramCodeSectionToDiv(htmlBody); } return renderAsHtml(QString(), htmlBody, options); }