From 49f6c45c3d60fe0251843cc23ce289ec23b3501b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 9 Oct 2018 13:10:49 -0400 Subject: internal links --- org/output_xmls.org | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'org/output_xmls.org') diff --git a/org/output_xmls.org b/org/output_xmls.org index cb7830a..a1b166e 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -466,7 +466,7 @@ auto inline_links(M,O)( "$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( @@ -770,7 +770,6 @@ auto heading(M,O)( 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") @@ -779,9 +778,6 @@ auto heading(M,O)( } _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) ? "" : ""; @@ -879,6 +875,8 @@ auto para(M,O)( _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