diff options
Diffstat (limited to 'src/doc_reform/output')
-rw-r--r-- | src/doc_reform/output/rgx.d | 1 | ||||
-rw-r--r-- | src/doc_reform/output/xmls.d | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/doc_reform/output/rgx.d b/src/doc_reform/output/rgx.d index 86cd48b..c7896ac 100644 --- a/src/doc_reform/output/rgx.d +++ b/src/doc_reform/output/rgx.d @@ -80,6 +80,7 @@ static template DocReformOutputRgxInit() { static inline_link_stow_uri = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links static inline_link_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>#(?P<segname>\S+?))├`, "mg"); static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg"); + static inline_link_toc_to_backmatter = ctRegex!(`┤#(?P<link>endnotes|bibliography|bookindex|glossary|blurb)├`, "mg"); static inline_a_url = ctRegex!(`(┤)([^\s┥┝┤├]+)(├)`, "mg"); static url = ctRegex!(`https?://`, "mg"); static uri = ctRegex!(`(?:https?|git)://`, "mg"); diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d index 3bf20cc..164613b 100644 --- a/src/doc_reform/output/xmls.d +++ b/src/doc_reform/output/xmls.d @@ -816,6 +816,9 @@ template outputXHTMLs() { M doc_matters, string _suffix = ".html", ) { + if (obj.metainfo.is_a == "toc" && _txt.match(rgx.inline_link_toc_to_backmatter)) { + _txt = _txt.replaceAll(rgx.inline_link_toc_to_backmatter, "┤#section_$1├"); + } _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = para(_txt, obj, doc_matters); return o; |