summaryrefslogtreecommitdiffstats
path: root/src/fileparser.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2016-08-30 12:37:13 (GMT)
committeralbert-github <albert.tests@gmail.com>2016-08-30 12:37:13 (GMT)
commit2b229f69041023f5f473385ee587ef7743850f55 (patch)
tree17e207154e1629d9e3589f3097e60c2aa41ed35d /src/fileparser.cpp
parent8b1e673c427be33887373e766eff02c9fe57b39f (diff)
downloadDoxygen-2b229f69041023f5f473385ee587ef7743850f55.zip
Doxygen-2b229f69041023f5f473385ee587ef7743850f55.tar.gz
Doxygen-2b229f69041023f5f473385ee587ef7743850f55.tar.bz2
Code with "extension" unparsed shows line numbers
When using a code fragment in "regular" documentation like: @code This is a code fragment @endcode this is shown without line numbers but when using {unparsed} or another unknown extension, so @code{unparsed} This is a code fragment @endcode line numbers were shown. (similar for the markdown fenced block).
Diffstat (limited to 'src/fileparser.cpp')
-rw-r--r--src/fileparser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fileparser.cpp b/src/fileparser.cpp
index b54b243..6883622 100644
--- a/src/fileparser.cpp
+++ b/src/fileparser.cpp
@@ -22,7 +22,7 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf,
SrcLangExt, // lang
bool, // isExampleBlock
const char *, // exampleName
- FileDef *, // fileDef
+ FileDef * fileDef,
int startLine,
int endLine,
bool, // inlineFragment
@@ -40,8 +40,8 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf,
int j=i;
while (j<length && input[j]!='\n') j++;
QCString lineStr = input.mid(i,j-i);
- codeOutIntf.startCodeLine(showLineNumbers);
- if (showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
+ codeOutIntf.startCodeLine(fileDef != 0 && showLineNumbers);
+ if (fileDef != 0 && showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr);
codeOutIntf.endCodeLine();
lineNr++;