diff options
Diffstat (limited to 'src/sisudoc/ocda/meta/metadoc_from_src_functions.d')
| -rw-r--r-- | src/sisudoc/ocda/meta/metadoc_from_src_functions.d | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sisudoc/ocda/meta/metadoc_from_src_functions.d b/src/sisudoc/ocda/meta/metadoc_from_src_functions.d index 08ee22c..0deeb72 100644 --- a/src/sisudoc/ocda/meta/metadoc_from_src_functions.d +++ b/src/sisudoc/ocda/meta/metadoc_from_src_functions.d @@ -67,6 +67,27 @@ template docAbstractionFunctions() { string anchor_tag_; string[string] tag_in_seg; bool[string] _heading_anchor_tags_seen; + /+ ↓ the segment names spine makes for itself, which a heading in the + document may not also claim. + . + A document that writes "1~endnotes Endnote" asks for the name spine + gives the gathered endnotes. Both then wrote into endnotes.xhtml, + and the navigation listed that file twice, the second time behind + its own previous entry in reading order. Seeding the seen set with + these names means the document's heading is disambiguated the same + way a repeated anchor tag is, and the generated section keeps the + name that the table of contents links to. + +/ + bool[string] _reserved_heading_anchor_tags() { + bool[string] _reserved; + foreach (_name; [ + "toc", "endnotes", "glossary", "bibliography", "bookindex", "blurb", + "_the_title", + ]) { + _reserved[_name] = true; + } + return _reserved; + } string lev_anchor_tag; string[string][string] tag_assoc; string[] lv0to3_tags; |
