diff options
author | albert-github <albert.tests@gmail.com> | 2021-05-13 12:21:18 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-05-13 12:21:18 (GMT) |
commit | 21745032ff5ac1ce228c7e68afdf1b66cb293b38 (patch) | |
tree | 4f876ab23578c0f79b13eeb51946312b6343a749 /src/docparser.h | |
parent | cd998a7164e30cee896cccd190846b79ebb4355f (diff) | |
download | Doxygen-21745032ff5ac1ce228c7e68afdf1b66cb293b38.zip Doxygen-21745032ff5ac1ce228c7e68afdf1b66cb293b38.tar.gz Doxygen-21745032ff5ac1ce228c7e68afdf1b66cb293b38.tar.bz2 |
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{`.
Diffstat (limited to 'src/docparser.h')
-rw-r--r-- | src/docparser.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; |