From 49f6c45c3d60fe0251843cc23ce289ec23b3501b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 9 Oct 2018 13:10:49 -0400 Subject: internal links --- src/doc_reform/output/xmls.d | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/doc_reform/output/xmls.d') diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d index 47053f3..571c1af 100644 --- a/src/doc_reform/output/xmls.d +++ b/src/doc_reform/output/xmls.d @@ -351,7 +351,7 @@ template outputXHTMLs() { "$1"); } if (_xml_type == "seg" || _xml_type == "epub") { - if (auto m = _txt.match(rgx.inline_link_hash)) { + foreach (m; _txt.match(rgx.inline_link_hash)) { if (m.captures[3] in doc_matters.xml.tag_associations) { if (m.captures[3] == doc_matters.xml.tag_associations[(m.captures[3])][0]) { _txt = _txt.replaceFirst( @@ -609,7 +609,6 @@ template outputXHTMLs() { string _xml_type = "html", ) { auto tags = _xhtml_anchor_tags(obj); - string seg_anchor_tag; string heading_lev_anchor_tag; string _horizontal_rule = "
"; if ((_xml_type != "html") @@ -618,9 +617,6 @@ template outputXHTMLs() { } _txt = font_face(_txt); string o; - seg_anchor_tag = (obj.tags.segment_anchor_tag.empty) - ? "" - : ""; heading_lev_anchor_tag = (obj.tags.heading_lev_anchor_tag.empty) ? "" : ""; @@ -699,6 +695,8 @@ template outputXHTMLs() { _txt = font_face(_txt); string o; _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; + _txt = _txt.replaceFirst(rgx.inline_link_anchor, + ""); if (obj.metainfo.object_number.empty) { o = format(q"¶

%s -- cgit v1.2.3