Commit 63dedfa8 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Fixed issue handling \docbookonly..\enddocbookonly section

parent 096c5944
......@@ -1352,7 +1352,7 @@ reparsetoken:
doctokenizerYYsetStateDbOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::DocbookOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"xmlonly section ended without end marker",doctokenizerYYlineno);
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
break;
......@@ -5472,6 +5472,15 @@ int DocPara::handleCommand(const QCString &cmdName)
doctokenizerYYsetStatePara();
}
break;
case CMD_DBONLY:
{
doctokenizerYYsetStateDbOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::DocbookOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"docbookonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
break;
case CMD_VERBATIM:
{
doctokenizerYYsetStateVerbatim();
......
......@@ -1099,6 +1099,10 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
g_endMarker="endxmlonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
g_endMarker="enddocbookonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
g_endMarker="endcode";
BEGIN(St_SecSkip);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment