diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-11 05:53:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-11 05:53:12 +0200 |
commit | 01314f53987e57c4fcb49fb86d3971bdb206857f (patch) | |
tree | 8e78e418a7e987182cc1fc1735f352817549eb1a /cli/context.hxx | |
parent | 471556a19e68b372155095c1b11aa568735fe867 (diff) | |
download | cli-01314f53987e57c4fcb49fb86d3971bdb206857f.tar.gz cli-01314f53987e57c4fcb49fb86d3971bdb206857f.tar.xz cli-01314f53987e57c4fcb49fb86d3971bdb206857f.zip |
Add support for ids in paragraphs, local fragment references in links
For example:
"
\h#hello|Hello Example|
See the \l{#hello Hello Example}
"
Diffstat (limited to 'cli/context.hxx')
-rw-r--r-- | cli/context.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/context.hxx b/cli/context.hxx index 79c9aab..c67cec5 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -99,6 +99,11 @@ public: regex_mapping const& link_regex; + typedef std::set<string> id_set_type; + id_set_type& id_set; + id_set_type& ref_set; + + // TOC phase. // // 0 - non-TOC @@ -126,6 +131,8 @@ private: string cli_; keyword_set_type keyword_set_; regex_mapping link_regex_; + id_set_type id_set_; + id_set_type ref_set_; unsigned short toc_; toc_stack tocs_; }; @@ -166,6 +173,13 @@ public: string end_toc (); + // Make sure each local fragment reference has the corresponding id. Issue + // diagnostics and throw generation_failed if fails. Otherwise clear the + // id and ref sets. + // + void + verify_id_ref (); + // Substitute doc variable expansions ($var$). Var must be a C identifier. // If the path is not NULL, then also recognize names that start with either // ./ or ../ and treat them as files relative to path. Such file expansions |