diff options
author | Brad King <brad.king@kitware.com> | 2013-10-29 20:18:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-30 14:26:29 (GMT) |
commit | 450b515ad0e94155061e3a9d43fcbab53bf7ac80 (patch) | |
tree | 58c6a7d30990ea5bef642fab16e7eaef9cedba34 /Source/cmRST.cxx | |
parent | 6e900fbe6970981f8c73500581df99fa6b955fa1 (diff) | |
download | CMake-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.cxx | 12 |
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. |