From be384681a55a09f0deb284eb18da63c082240c68 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 Aug 2018 10:22:11 -0400 Subject: catches --- org/meta_abstraction.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'org/meta_abstraction.org') diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 05f204d..7eaba8c 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -1166,7 +1166,10 @@ if ((obj_type_status["heading"] == State.on) cnt3 = 1; _new_doc = false; } - if (an_object["lev_markup_number"].to!int == 4 ) { + if ( + an_object["lev_markup_number"].to!int == 4 + && anchor_tags.length > 0 + ) { segment_anchor_tag_that_object_belongs_to = anchor_tags[0]; segment_anchor_tag_that_object_belongs_to_uri = anchor_tags[0] ~ ".fnSuffix"; anchor_tag_ = anchor_tags[0]; @@ -6081,6 +6084,10 @@ private: munge_=(munge_).replaceFirst( rgx.heading_marker_missing_tag, "$1~" ~ m.captures[1].toLower ~ "_" ~ m.captures[2] ~ " "); + if (auto n = munge_.match(rgx.heading_anchor_tag_plus_colon)) { + auto tag_remunge_ = n.captures[2].replaceAll(rgx.heading_marker_tag_has_colon, ".."); + munge_=(munge_).replaceFirst(rgx.heading_anchor_tag_plus_colon, n.captures[1] ~ tag_remunge_ ~ " "); + } } else if (auto m = munge_.match(rgx.heading_extract_unnamed_anchor_tag)) { munge_=(munge_).replaceFirst( rgx.heading_marker_missing_tag, -- cgit v1.2.3