diff options
author | albert-github <albert.tests@gmail.com> | 2018-11-25 15:34:58 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-11-25 15:34:58 (GMT) |
commit | 1c0a565a28582d0bc0776988ffef16565563e950 (patch) | |
tree | 2ec63650e76e2f1e57bfa1f6eef0d84059e07b52 /src/docparser.cpp | |
parent | 4c1d17ef7579dabd4db55dc4777185c290edb256 (diff) | |
download | Doxygen-1c0a565a28582d0bc0776988ffef16565563e950.zip Doxygen-1c0a565a28582d0bc0776988ffef16565563e950.tar.gz Doxygen-1c0a565a28582d0bc0776988ffef16565563e950.tar.bz2 |
Incorrect number tag sequence for xhtml with htmlinclude command possible
Analogous to the `\htmlonly` also with the `\htmlinclude` command it is possible that some parts are added that cannot be inside a `<p> ... <\/p>` and thus we have to temporary close (and later reopen) the paragraph.
The option `[block]` has been added to the `\htmlinclude` command (analogous to the `\htmlonly` command).
Problem can be seen with the default doxygen test 30 (`[030_htmlinclude.dox]: test the \htmlinclude command`).
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 39978de..83f557b 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -5238,6 +5238,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) { DBG(("handleInclude(%s)\n",qPrint(cmdName))); int tok=doctokenizerYYlex(); + bool isBlock = false; if (tok==TK_WORD && g_token->name=="{") { doctokenizerYYsetStateOptions(); @@ -5262,6 +5263,14 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) } tok=doctokenizerYYlex(); } + else if (tok==TK_WORD && g_token->name=="[") + { + doctokenizerYYsetStateBlock(); + tok=doctokenizerYYlex(); + isBlock = (g_token->name.stripWhiteSpace() == "block"); + doctokenizerYYsetStatePara(); + tok=doctokenizerYYlex(); + } else if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", @@ -5320,7 +5329,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) } else { - DocInclude *inc = new DocInclude(this,fileName,g_context,t,g_isExample,g_exampleName,blockId); + DocInclude *inc = new DocInclude(this,fileName,g_context,t,g_isExample,g_exampleName,blockId,isBlock); m_children.append(inc); inc->parse(); } |