summaryrefslogtreecommitdiffstats
path: root/Source/cmRST.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-29 20:18:29 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-30 14:26:29 (GMT)
commit450b515ad0e94155061e3a9d43fcbab53bf7ac80 (patch)
tree58c6a7d30990ea5bef642fab16e7eaef9cedba34 /Source/cmRST.cxx
parent6e900fbe6970981f8c73500581df99fa6b955fa1 (diff)
downloadCMake-450b515ad0e94155061e3a9d43fcbab53bf7ac80.zip
CMake-450b515ad0e94155061e3a9d43fcbab53bf7ac80.tar.gz
CMake-450b515ad0e94155061e3a9d43fcbab53bf7ac80.tar.bz2
cmRST: Add support for the note and productionlist directives
Simply print out the lines as normal paragraph text. Teach the CMakeLib.testRST test to cover this syntax. Update the cmake-developer.7 manual to document support for the directives.
Diffstat (limited to 'Source/cmRST.cxx')
-rw-r--r--Source/cmRST.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 6d4e281..3aa8e1b 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -34,6 +34,8 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot):
ReplaceDirective("^.. (\\|[^|]+\\|) replace::[ \t]*(.*)$"),
IncludeDirective("^.. include::[ \t]+([^ \t\n]+)$"),
TocTreeDirective("^.. toctree::[ \t]*(.*)$"),
+ ProductionListDirective("^.. productionlist::[ \t]*(.*)$"),
+ NoteDirective("^.. note::[ \t]*(.*)$"),
ModuleRST("^#\\[(=*)\\[\\.rst:$"),
CMakeRole("(:cmake)?:("
"command|generator|variable|module|policy|"
@@ -227,6 +229,16 @@ void cmRST::ProcessLine(std::string const& line)
this->Directive = DirectiveTocTree;
this->MarkupLines.push_back(this->TocTreeDirective.match(1));
}
+ else if(this->ProductionListDirective.find(line))
+ {
+ // Output productionlist directives and their content normally.
+ this->NormalLine(line);
+ }
+ else if(this->NoteDirective.find(line))
+ {
+ // Output note directives and their content normally.
+ this->NormalLine(line);
+ }
}
// An explicit markup start followed nothing but whitespace and a
// blank line does not consume any indented text following.