Skip to content

Commit 81d29d7

Browse files
committed
issue #11147 Functions are incorrectly flagged as undocumented if not generating HTML or LaTeX
Regression on: ``` commit 2c76059 (HEAD) Date: Wed Apr 20 19:52:43 2022 +0200 Minor optimisation ``` reverting regression and also correcting `parseText` (see also discussion with #11148
1 parent 62d1ace commit 81d29d7

1 file changed

Lines changed: 18 additions & 24 deletions

File tree

src/outputlist.cpp

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,16 @@ void OutputList::generateDoc(const QCString &fileName,int startLine,
176176

177177
auto count=std::count_if(m_outputGenList.begin(),m_outputGenList.end(),
178178
[](const auto &e) { return e.enabled; });
179-
if (count>0)
180-
{
181-
// we want to validate irrespective of the number of output formats
182-
// specified as:
183-
// - when only XML format there should be warnings as well (XML has its own write routines)
184-
// - no formats there should be warnings as well
185-
auto parser { createDocParser() };
186-
auto ast { validatingParseDoc(*parser.get(),
187-
fileName,startLine,
188-
ctx,md,docStr,indexWords,isExample,exampleName,
189-
singleLine,linkFromIndex,markdownSupport) };
190-
if (ast) writeDoc(ast.get(),ctx,md);
191-
}
179+
// we want to validate irrespective of the number of output formats
180+
// specified as:
181+
// - when only XML format there should be warnings as well (XML has its own write routines)
182+
// - no formats there should be warnings as well
183+
auto parser { createDocParser() };
184+
auto ast { validatingParseDoc(*parser.get(),
185+
fileName,startLine,
186+
ctx,md,docStr,indexWords,isExample,exampleName,
187+
singleLine,linkFromIndex,markdownSupport) };
188+
if (ast && count>0) writeDoc(ast.get(),ctx,md);
192189
}
193190

194191
void OutputList::startFile(const QCString &name,const QCString &manName,const QCString &title, int hierarchyLevel)
@@ -204,17 +201,14 @@ void OutputList::parseText(const QCString &textStr)
204201
auto count=std::count_if(m_outputGenList.begin(),m_outputGenList.end(),
205202
[](const auto &e) { return e.enabled; });
206203

207-
if (count>0)
208-
{
209-
// we want to validate irrespective of the number of output formats
210-
// specified as:
211-
// - when only XML format there should be warnings as well (XML has its own write routines)
212-
// - no formats there should be warnings as well
213-
auto parser { createDocParser() };
214-
auto ast { validatingParseText(*parser.get(), textStr) };
215-
216-
if (ast) writeDoc(ast.get(),nullptr,nullptr);
217-
}
204+
// we want to validate irrespective of the number of output formats
205+
// specified as:
206+
// - when only XML format there should be warnings as well (XML has its own write routines)
207+
// - no formats there should be warnings as well
208+
auto parser { createDocParser() };
209+
auto ast { validatingParseText(*parser.get(), textStr) };
210+
211+
if (ast && count>0) writeDoc(ast.get(),nullptr,nullptr);
218212
}
219213

220214
//--------------------------------------------------------------------------

0 commit comments

Comments
 (0)