From 21745032ff5ac1ce228c7e68afdf1b66cb293b38 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 13 May 2021 14:21:18 +0200 Subject: Formulas with a new environment handled as inline formulas As a regression of #8509 formulas that start a new environment (`\f{`) were considered as inline formulas as teh inline test looked for a `\{` but should look for `\begin{`. --- src/docparser.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/docparser.h b/src/docparser.h index 2117cbb..f256c56 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -642,7 +642,11 @@ class DocFormula : public DocNode QCString relPath() const { return m_relPath; } int id() const { return m_id; } void accept(DocVisitor *v) override { v->visit(this); } - bool isInline() { return m_text.length()>1 ? !(m_text.at(0)=='\\' && (m_text.at(1)=='{' || m_text.at(1)=='[')): TRUE; } + bool isInline() { + if (m_text.length()>1 && m_text.at(0)=='\\' && m_text.at(1)=='[') return false; + if (m_text.length()>7 && m_text.startsWith("\\begin{")) return false; + return true; + } private: QCString m_name; -- cgit v0.12