diff options
Diffstat (limited to 'org/metaverse.org')
-rw-r--r-- | org/metaverse.org | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/org/metaverse.org b/org/metaverse.org index 0e1dff0..94b5690 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -713,6 +713,8 @@ scope(exit) { destroy(biblio_arr_json); previous_length = 0; reset_note_numbers = true; + lev_anchor_tag = ""; + anchor_tag = ""; } #+END_SRC @@ -1678,7 +1680,7 @@ if (pith["txt_is"] == eN.txt_is.heading comp_obj_para.attrib.indent_hang = indent["hang_position"]; comp_obj_para.attrib.indent_base = indent["base_position"]; comp_obj_para.attrib.bullet = bullet; - comp_obj_para.tags.anchor_tags = [anchor_tag]; + comp_obj_para.tags.anchor_tags = [anchor_tag]; anchor_tag=""; comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links]; @@ -3238,6 +3240,8 @@ dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +lev_anchor_tag = ""; +anchor_tag = ""; #+END_SRC *** doc has struct @@ -5978,7 +5982,7 @@ static struct ObjInlineMarkup { static auto rgx = RgxI(); static auto munge = ObjInlineMarkupMunge(); string[string] obj_txt; - static string anchor_tag = ""; + string anchor_tag = ""; #+END_SRC ******* object inline markup and anchor tags :markup:inline: @@ -6351,6 +6355,9 @@ static int heading_num_lev1 = 0; bool _new_doc ) { if (!(munge_.match(rgx.heading_anchor_tag))) { + if (lev_ == "A") { // (_new_doc) + heading_num_lev1 = 0; + } if (munge_.match(rgx.heading_identify_anchor_tag)) { if (auto m = munge_.match(rgx.heading_extract_named_anchor_tag)) { munge_ = munge_.replaceFirst( @@ -6367,9 +6374,6 @@ static int heading_num_lev1 = 0; "$1~" ~ "s" ~ m.captures[1] ~ " "); } } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev == "1" - if (_new_doc) { - heading_num_lev1 = 0; - } heading_num_lev1 ++; munge_ = munge_.replaceFirst( rgx.heading_marker_missing_tag, |