diff options
Diffstat (limited to 'org')
| -rw-r--r-- | org/metaverse.org | 14 | ||||
| -rw-r--r-- | org/out_xmls.org | 9 | 
2 files changed, 14 insertions, 9 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, diff --git a/org/out_xmls.org b/org/out_xmls.org index 12cd0dc..1158ff7 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -203,10 +203,9 @@ import  #+NAME: xhtml_format_objects_4  #+BEGIN_SRC d  @safe string _xhtml_anchor_tags(O)(O obj) { -  const(string[]) anchor_tags = obj.tags.anchor_tags;    string tags=""; -  if (anchor_tags.length > 0) { -    foreach (tag; anchor_tags) { +  if (obj.tags.anchor_tags.length > 0) { +    foreach (tag; obj.tags.anchor_tags) {        if (!(tag.empty)) {          tags ~= "<a name=\"" ~ tag ~ "\"></a>";        } @@ -919,7 +918,9 @@ import    </div>┃",        _horizontal_rule,        obj.metainfo.identifier, -      (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier), +      (doc_matters.opt.action.ocn_off) +        ? "" : ((obj.metainfo.object_number.empty) +          ? "" : obj.metainfo.identifier),        obj.metainfo.heading_lev_markup,        obj.metainfo.is_a,        obj.metainfo.identifier, | 
