Skip to content

Commit

Permalink
More indicative warning for wrong nesting of sections
Browse files Browse the repository at this point in the history
In case we have a "*section" outside the hierarchy it is useful also have the id of the misbehaving "*section" even though line numbers are given , they might be misleading.
  • Loading branch information
albert-github committed Feb 8, 2020
1 parent 93245ad commit 4281a6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7133,7 +7133,7 @@ void DocRoot::parse()
{
if (!g_token->sectionId.startsWith("autotoc_md"))
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command outside of subsubsection context!");
warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command (id: '%s') outside of subsubsection context!",qPrint(g_token->sectionId));
}
while (retval==RetVal_Paragraph)
{
Expand Down Expand Up @@ -7163,7 +7163,7 @@ void DocRoot::parse()
if (retval==RetVal_Subsubsection)
{
if (!(g_token->sectionId.startsWith("autotoc_md")))
warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command outside of subsection context!");
warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command (id: '%s') outside of subsection context!",qPrint(g_token->sectionId));
while (retval==RetVal_Subsubsection)
{
if (!g_token->sectionId.isEmpty())
Expand Down Expand Up @@ -7193,7 +7193,7 @@ void DocRoot::parse()
{
if (!g_token->sectionId.startsWith("autotoc_md"))
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command outside of section context!");
warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command (id: '%s') outside of section context!",qPrint(g_token->sectionId));
}
while (retval==RetVal_Subsection)
{
Expand Down

0 comments on commit 4281a6c

Please sign in to comment.