summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2016-09-02 13:01:11 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2016-09-03 09:04:38 (GMT)
commit9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6 (patch)
treecd636c234fbe837dddfabbb0230aa016e01d6572 /doc
parent445347566078a1cc64705f28932e1da5bf9f531f (diff)
downloadDoxygen-9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6.zip
Doxygen-9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6.tar.gz
Doxygen-9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6.tar.bz2
Bug 770660 - Code snippet always shows line numbers from 1
This patch makes the handling of the \snippet and other commands consistent between the different languages (no line numbers anymore with python) and also introduces analogous to \includelineno the command \snippetlineno. Some non relevant changes: - *code.l Calculation of the end line was incorrect, in case of a snippet the end line was the number of lines of the snippet and not reltive to the start line. - *code.l made consistent over the different laguages, enabling exBlock and inlineFragment - testing/indexpage.xml in test 14 the \snippet command was used with python and giving line numbers, linenumbers are now gone (consistency)
Diffstat (limited to 'doc')
-rw-r--r--doc/commands.doc19
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/commands.doc b/doc/commands.doc
index d9d38e8..6cb7a4d 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -179,6 +179,7 @@ documentation:
\refitem cmdskipline \\skipline
\refitem cmdsnippet \\snippet
\refitem cmdsnippetdoc \\snippetdoc
+\refitem cmdsnippetlineno \\snippetlineno
\refitem cmdstartuml \\startuml
\refitem cmdstruct \\struct
\refitem cmdsubpage \\subpage
@@ -2183,7 +2184,7 @@ Commands for displaying examples
This command works the same way as \ref cmdinclude "\\include", but will add line
numbers to the included file.
- \sa section \ref cmdinclude "\\include".
+ \sa sections \ref cmdinclude "\\include" and \ref cmdsnippetlineno "\\snippetlineno".
<hr>
\section cmdincludedoc \\includedoc <file-name>
@@ -2303,7 +2304,16 @@ Commands for displaying examples
see section \ref cmddontinclude "\\dontinclude" for an alternative way
to include fragments of a source file that does not require markers.
- \sa section \ref cmdsnippetdoc "\\snippetdoc".
+ \sa section \ref cmdsnippetdoc "\\snippetdoc" and \ref cmdsnippetlineno "\\snippetlineno".
+<hr>
+\section cmdsnippetlineno \\snippetlineno <file-name> ( block_id )
+
+ \addindex \\snippetlineno
+ This command works the same way as \ref cmdsnippet "\\snippet", but will add line
+ numbers to the included snippet.
+
+ \sa sections \ref cmdsnippet "\\snippet" and \ref cmdincludelineno "\\includelineno".
+
<hr>
\section cmdsnippetdoc \\snippetdoc <file-name> ( block_id )
@@ -3212,9 +3222,8 @@ class Receiver
\c \\verbatim command or the parser will get confused!
\sa sections \ref cmdcode "\\code",
- \ref cmdendverbatim "\\endverbatim",
- \ref cmdverbinclude "\\verbinclude", and
- \ref cmdverbincludedooc "\\verbincludedooc".
+ \ref cmdendverbatim "\\endverbatim" and
+ \ref cmdverbinclude "\\verbinclude".
<hr>
\section cmdxmlonly \\xmlonly