aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output_xmls.org
diff options
context:
space:
mode:
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