summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2014-08-15 13:25:25 (GMT)
committeralbert-github <albert.tests@gmail.com>2014-08-15 13:25:25 (GMT)
commitf8ceac63bdb52cf395207258c98ff0bcba35870a (patch)
tree880acd6af86fb321545ccf2dd1f36105259eb106 /src/docparser.cpp
parent7d9d4320f5d183c4e1ebc87a316589c36f0afeed (diff)
downloadDoxygen-f8ceac63bdb52cf395207258c98ff0bcba35870a.zip
Doxygen-f8ceac63bdb52cf395207258c98ff0bcba35870a.tar.gz
Doxygen-f8ceac63bdb52cf395207258c98ff0bcba35870a.tar.bz2
Create an easy possibility to take a snippet from the current file.
In case the snippet of code is in the current file one has to specify the name of the file and also see to it that the file is reachable through the EXAMPLE_PATH. A use case is the case of a list of initial values here it is quite often more convenient to have the values listed in a 'nice' list than direct in the definition line. With this patch it is possible to specify the name of the file where the snippet resides as: this
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index bab0c75..b8aa9a6 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -5218,6 +5218,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
QCString blockId;
if (t==DocInclude::Snippet)
{
+ if (fileName == "this") fileName=g_fileName;
doctokenizerYYsetStateSnippet();
tok=doctokenizerYYlex();
doctokenizerYYsetStatePara();