summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-02 14:54:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-02 14:54:10 (GMT)
commit2043a86b6a25cfbd97a3d9cbbe3ccbf60d423276 (patch)
tree3d6812e1e8b7ca33dd8d2358e9a4b29ebab655cf /Source
parent5b838ed38347cb867acaee3f1ec706abfb648e64 (diff)
parent450b515ad0e94155061e3a9d43fcbab53bf7ac80 (diff)
downloadCMake-2043a86b6a25cfbd97a3d9cbbe3ccbf60d423276.zip
CMake-2043a86b6a25cfbd97a3d9cbbe3ccbf60d423276.tar.gz
CMake-2043a86b6a25cfbd97a3d9cbbe3ccbf60d423276.tar.bz2
Merge topic 'doc-rst-note-and-productionlist'
450b515 cmRST: Add support for the note and productionlist directives
Diffstat (limited to 'Source')
-rw-r--r--Source/cmRST.cxx12
-rw-r--r--Source/cmRST.h2
2 files changed, 14 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.
diff --git a/Source/cmRST.h b/Source/cmRST.h
index fa987cd..3356008 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -84,6 +84,8 @@ private:
cmsys::RegularExpression ReplaceDirective;
cmsys::RegularExpression IncludeDirective;
cmsys::RegularExpression TocTreeDirective;
+ cmsys::RegularExpression ProductionListDirective;
+ cmsys::RegularExpression NoteDirective;
cmsys::RegularExpression ModuleRST;
cmsys::RegularExpression CMakeRole;
cmsys::RegularExpression Substitution;