diff options
author | albert-github <albert.tests@gmail.com> | 2019-03-03 14:59:48 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-03-03 14:59:48 (GMT) |
commit | 8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc (patch) | |
tree | 971dfd0b77afc78f1a970fa889a829f18293ba17 /src/htmldocvisitor.cpp | |
parent | abe69bd634fea9554a84d93e31db889ee589661f (diff) | |
download | Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.zip Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.tar.gz Doxygen-8d13a1a9d0e6a5e4f50563b6d1b6840176e4a5cc.tar.bz2 |
Show line numbers in "split" examples
With the commands like `\skip`, `\skipline` it is possible to show parts of a file for further explanation / tutorials. They can be started with `\include` or `\dontinclude` but in case `\include` specifies that the line numbers have to be shown they are only shown in the full example and not in the split up example
- show line numbers in split up example in case `lineno` is required
- add `lineno` option to `\dontinclude` so here also line numbers can be shown.
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 81d28eb..881680e 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -762,6 +762,12 @@ void HtmlDocVisitor::visit(DocIncOperator *op) popEnabled(); if (!m_hide) { + FileDef *fd; + if (!op->includeFileName().isEmpty()) + { + QFileInfo cfi( op->includeFileName() ); + fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); + } Doxygen::parserManager->getParser(m_langExt) ->parseCode( m_ci, @@ -770,14 +776,15 @@ void HtmlDocVisitor::visit(DocIncOperator *op) langExt, op->isExample(), op->exampleFile(), - 0, // fileDef - -1, // startLine + fd, // fileDef + op->line(), // startLine -1, // endLine FALSE, // inline fragment 0, // memberDef - TRUE, // show line numbers + op->lineno(), // show line numbers m_ctx // search context ); + if (fd) delete fd; } pushEnabled(); m_hide=TRUE; |