aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_xmls.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2018-10-09 13:10:49 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-04-10 15:14:15 -0400
commit49f6c45c3d60fe0251843cc23ce289ec23b3501b (patch)
tree70604d0b0a09ca0ec96949bada9f8ec6f0082baa /org/output_xmls.org
parentxmls segmented heading inline links (diff)
internal links
Diffstat (limited to 'org/output_xmls.org')
-rw-r--r--org/output_xmls.org8
1 files changed, 3 insertions, 5 deletions
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 = "<hr />";
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)
- ? ""
- : "<a name=\"" ~ obj.tags.segment_anchor_tag ~ "\"></a>";
heading_lev_anchor_tag = (obj.tags.heading_lev_anchor_tag.empty)
? ""
: "<a name=\"" ~ obj.tags.heading_lev_anchor_tag ~ "\"></a>";
@@ -879,6 +875,8 @@ auto para(M,O)(
_txt = font_face(_txt);
string o;
_txt = (obj.attrib.bullet) ? ("●&#160;&#160;" ~ _txt) : _txt;
+ _txt = _txt.replaceFirst(rgx.inline_link_anchor,
+ "<a name=\"$1\"></a>");
if (obj.metainfo.object_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s" indent="h%si%s">%s