diff options
| -rw-r--r-- | org/ocda.org | 471 | ||||
| -rw-r--r-- | src/doc_reform/meta/metadoc_from_src.d | 471 | 
2 files changed, 476 insertions, 466 deletions
| diff --git a/org/ocda.org b/org/ocda.org index 99f7d1a..975ab3d 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -186,28 +186,29 @@ int[] dom_structure_markedup_tags_status         = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]  int[] dom_structure_markedup_tags_status_buffer  = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];  int[] dom_structure_collapsed_tags_status        = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];  int[] dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; -alias TxtPlusHasFootnotes = Tuple!( -  string, "obj_txt", -  bool,   "has_notes_reg", -  bool,   "has_notes_star", -  bool,   "has_notes_plus", -); -alias TxtPlusHasFootnotesUrlsImages = Tuple!( -  string, "obj_txt", -  bool,   "has_notes_reg", -  bool,   "has_notes_star", -  bool,   "has_notes_plus", -  bool,   "has_urls", -  bool,   "has_images_without_dimensions", -); -alias TxtAndAnchorTagPlusHasFootnotesUrlsImages = Tuple!( -   string, "obj_txt", -   string, "anchor_tag", -   bool,   "has_notes_reg", -   bool,   "has_notes_star", -   bool,   "has_links", -   bool,   "has_images_without_dimensions", -); +struct  ST_txtPlusHasFootnotes { +  string           obj_txt; +  bool             has_notes_reg; +  bool             has_notes_star; +  bool             has_notes_plus; +} +struct ST_txtPlusHasFootnotesUrlsImages { +  string           obj_txt; +  bool             has_notes_reg; +  bool             has_notes_star; +  bool             has_notes_plus; +  bool             has_urls; +  bool             has_images_without_dimensions; +} +struct ST_txtAndAnchorTagPlusHasFootnotesUrlsImages { +  string           obj_txt; +  string           anchor_tag; +  bool             has_notes_reg; +  bool             has_notes_star; +  bool             has_notes_plus; +  bool             has_links; // use same name +  bool             has_images_without_dimensions; +}  enum DomTags { none, open, close, close_and_open, open_still, }  @safe pure ObjGenericComposite obj_heading_ancestors()(    ObjGenericComposite  obj, @@ -406,7 +407,6 @@ string[][string][string] bookindex_unordered_hashes;  // node  ObjGenericComposite comp_obj_heading, comp_obj_location, comp_obj_block, comp_obj_code, comp_obj_poem_ocn, comp_obj_comment;  auto node_construct = NodeStructureMetadata(); -enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensions }  @safe string[string][string] inline_para_link_anchor()(    string[string]          an_object,    string[string]          tag_in_seg, @@ -423,47 +423,47 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio    }    return tag_assoc;  } -struct retStruct_txt_by_line_common_reset { +struct ST_txt_by_line_common_reset {    int[string]     line_occur;    string[string]  this_object;    uint[string]    pith;  } -struct retStruct_txt_by_line_block_start { +struct ST_txt_by_line_block_start {    uint[string]    pith;    uint[string]    dochas;    string[string]  object_number_poem;  } -struct retStruct_txt_by_line_block_generic { +struct ST_txt_by_line_block_generic {    uint[string]    pith;    string[string]  this_object;  } -struct retStruct_txt_by_line_block_poem { +struct ST_txt_by_line_block_poem {    int             cntr;    uint[string]    pith;    string[string]  this_object;  } -struct retStruct_txt_by_line_block_biblio { +struct ST_txt_by_line_block_biblio {    uint[string]    pith;    int             bib_entry;    string          biblio_entry_str_json;    string[]        biblio_arr_json;  } -struct retStruct_flow_book_index { +struct ST_flow_book_index {    string[string]  this_object;    uint[string]    pith;    string          book_idx_tmp;  } -struct retStruct_flow_heading_found { +struct ST_flow_heading_found {    string[string]       heading_match_str;    Regex!(char)[string] heading_match_rgx;    uint[string]         pith;  } -struct retStruct_flow_heading_make_set { +struct ST_flow_heading_make_set {    char[]          line;    uint[string]    pith;    string[string]  this_object;  } -struct retStruct_flow_para_match { +struct ST_flow_para_match {    uint[string]    pith;    string[string]  this_object;    string          this_object_key; @@ -471,20 +471,20 @@ struct retStruct_flow_para_match {    bool            bullet;    int[string]     line_occur;  } -struct retStruct_flow_table_array_munge { +struct ST_flow_table_array_munge {    ObjGenericComposite table_object;    string[][]          table_array;  } -struct retStruct_flow_table_of_contents_gather_headings { +struct ST_flow_table_of_contents_gather_headings {    ObjGenericComposite[] the_document_toc_section;    string[][string]      lev4_subtoc;  } -struct retStruct_flow_bibliography { +struct ST_flow_bibliography {    JSONValue[] biblio_sorted;    JSONValue[] bib_arr_json;    string[]    biblio_unsorted_incomplete;  } -struct retStruct_flow_table_closed_make_special_notation_table { +struct ST_flow_table_closed_make_special_notation_table {    string[string]        this_object;    ObjGenericComposite[] the_document_body_section;    OCNset                obj_cite_digits; @@ -492,7 +492,7 @@ struct retStruct_flow_table_closed_make_special_notation_table {    int                   cntr;    uint[string]          pith;  } -struct retStruct_flow_block_flag_line_empty { +struct ST_flow_block_flag_line_empty {    string[string]           this_object;    ObjGenericComposite[]    the_document_body_section;    string[][string][string] bookindex_unordered_hashes; @@ -501,7 +501,7 @@ struct retStruct_flow_block_flag_line_empty {    int                      cntr;    uint[string]             pith;  } -struct retStruct_flow_table_substantive_munge { +struct ST_flow_table_substantive_munge {    ObjGenericComposite  table_object;    string               table_substantive;  } @@ -1286,10 +1286,10 @@ struct retStruct_flow_table_substantive_munge {                : ocn_emit(pith["ocn"]);                an_object["is"] = "heading";                an_object_key = "body_nugget"; -              TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_tuple +              ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_struct                  = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, ((_new_doc) ? Yes._new_doc : No._new_doc)); -              an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content]; -              anchor_tag = substantive_object_and_anchor_tags_tuple[sObj.anchor_tag]; +              an_object["substantive"] = substantive_object_and_anchor_tags_struct.obj_txt; +              anchor_tag = substantive_object_and_anchor_tags_struct.anchor_tag;                if (_new_doc) {                  cnt1 = 1;                  cnt2 = 1; @@ -1389,9 +1389,9 @@ struct retStruct_flow_table_substantive_munge {                    lv_ancestors_txt,                             // string[]                    an_object["is"],                              // string                    html_segnames_ptr,                            // int -                  substantive_object_and_anchor_tags_tuple[sObj.notes_reg], -                  substantive_object_and_anchor_tags_tuple[sObj.notes_star], -                  substantive_object_and_anchor_tags_tuple[sObj.links], +                  substantive_object_and_anchor_tags_struct.has_notes_reg, +                  substantive_object_and_anchor_tags_struct.has_notes_star, +                  substantive_object_and_anchor_tags_struct.has_links,                  );                ++heading_ptr;                debug(segments) { @@ -1433,10 +1433,10 @@ struct retStruct_flow_table_substantive_munge {                    heading_ptr-1,                    an_object["is"],                  ); -              TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +              ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                  = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -              an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; -              anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; +              an_object["substantive"] = substantive_obj_misc_struct.obj_txt; +              anchor_tag = substantive_obj_misc_struct.anchor_tag;                comp_obj_para                                       = comp_obj_para.init;                comp_obj_para.metainfo.is_of_part                   = "body";                comp_obj_para.metainfo.is_of_section                = "body"; @@ -1454,10 +1454,10 @@ struct retStruct_flow_table_substantive_munge {                comp_obj_para.attrib.indent_base                    = indent["base_position"];                comp_obj_para.attrib.bullet                         = bullet;                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]; -              comp_obj_para.has.image_without_dimensions          = substantive_obj_misc_tuple[sObj.image_no_dimensions]; +              comp_obj_para.has.inline_notes_reg                  = substantive_obj_misc_struct.has_notes_reg; +              comp_obj_para.has.inline_notes_star                 = substantive_obj_misc_struct.has_notes_star; +              comp_obj_para.has.inline_links                      = substantive_obj_misc_struct.has_links; +              comp_obj_para.has.image_without_dimensions          = substantive_obj_misc_struct.has_images_without_dimensions;                the_document_body_section                           ~= comp_obj_para;                tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);                { @@ -2756,11 +2756,11 @@ struct retStruct_flow_table_substantive_munge {    @safe auto doc_has() {      return DocHas_();    } -  struct retStruct_docAbstraction { +  struct ST_docAbstraction {      ObjGenericComposite[][string] document_the;      DocHas_                       doc_has;    } -  retStruct_docAbstraction ret; +  ST_docAbstraction ret;    {      ret.document_the = document_the;      ret.doc_has      = doc_has; @@ -2774,7 +2774,7 @@ struct retStruct_flow_table_substantive_munge {  #+NAME: docSortOut  #+HEADER: :noweb yes  #+BEGIN_SRC d -@system retStruct_txt_by_line_common_reset txt_by_line_common_reset_()( +@system ST_txt_by_line_common_reset txt_by_line_common_reset_()(    int[string]     line_occur,    string[string]  an_object,    uint[string]    pith, @@ -2783,7 +2783,7 @@ struct retStruct_flow_table_substantive_munge {    line_occur["para"]                                  = eN.bi.off;    pith["txt_is"]                                      = eN.txt_is.off;    an_object                                           = an_object.object_reset; -  retStruct_txt_by_line_common_reset ret; +  ST_txt_by_line_common_reset ret;    {      ret.line_occur  = line_occur;      ret.this_object = an_object; @@ -2791,7 +2791,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_txt_by_line_block_start txt_by_line_block_start()( +@safe ST_txt_by_line_block_start txt_by_line_block_start()(    char[]         line,    uint[string]   pith,    uint[string]   dochas, @@ -2917,7 +2917,7 @@ struct retStruct_flow_table_substantive_munge {      pith["block_state"]             = eN.blk_state.on;      pith["block_delim"]             = eN.blk_delim.tic;    } -  retStruct_txt_by_line_block_start ret; +  ST_txt_by_line_block_start ret;    {      ret.pith               = pith;      ret.dochas             = dochas; @@ -2925,7 +2925,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_txt_by_line_block_generic txt_by_line_block_quote()( +@safe ST_txt_by_line_block_generic txt_by_line_block_quote()(    char[]          line,    string[string]  an_object,    uint[string]    pith, @@ -2956,14 +2956,14 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_txt_by_line_block_generic ret; +  ST_txt_by_line_block_generic ret;    {      ret.pith        = pith;      ret.this_object = an_object;    }    return ret;  } -@safe retStruct_txt_by_line_block_generic txt_by_line_block_group()( +@safe ST_txt_by_line_block_generic txt_by_line_block_group()(    char[]          line,    string[string]  an_object,    uint[string]    pith, @@ -2994,14 +2994,14 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_txt_by_line_block_generic ret; +  ST_txt_by_line_block_generic ret;    {      ret.pith        = pith;      ret.this_object = an_object;    }    return ret;  } -@safe retStruct_txt_by_line_block_generic txt_by_line_block_block()( +@safe ST_txt_by_line_block_generic txt_by_line_block_block()(    char[]          line,    string[string]  an_object,    uint[string]    pith, @@ -3032,14 +3032,14 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_txt_by_line_block_generic ret; +  ST_txt_by_line_block_generic ret;    {      ret.pith        = pith;      ret.this_object = an_object;    }    return ret;  } -@safe retStruct_txt_by_line_block_poem txt_by_line_block_poem(CMM)( +@safe ST_txt_by_line_block_poem txt_by_line_block_poem(CMM)(    char[]          line,    string[string]  an_object,    uint[string]    pith, @@ -3066,10 +3066,10 @@ struct retStruct_flow_table_substantive_munge {            if (an_object.length > 0) {              debug(poem) { writeln( obj_cite_digits.object_number, an_object[an_object_key]); }              an_object["is"]                                   = "verse"; -            TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +            ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -            an_object["substantive"]                          = substantive_obj_misc_tuple[sObj.content]; -            anchor_tag                                        = substantive_obj_misc_tuple[sObj.anchor_tag]; +            an_object["substantive"]                          = substantive_obj_misc_struct.obj_txt; +            anchor_tag                                        = substantive_obj_misc_struct.anchor_tag;              comp_obj_block                                    = comp_obj_block.init;              comp_obj_block.metainfo.is_of_part                = "body";              comp_obj_block.metainfo.is_of_section             = "body"; @@ -3083,9 +3083,9 @@ struct retStruct_flow_table_substantive_munge {              comp_obj_block.tags.html_segment_anchor_tag_is    = tag_in_seg["seg_lv4"];              comp_obj_block.tags.epub_segment_anchor_tag_is    = tag_in_seg["seg_lv1to4"];              comp_obj_block.text                               = an_object["substantive"]; -            comp_obj_block.has.inline_notes_reg               = substantive_obj_misc_tuple[sObj.notes_reg]; -            comp_obj_block.has.inline_notes_star              = substantive_obj_misc_tuple[sObj.notes_star]; -            comp_obj_block.has.inline_links                   = substantive_obj_misc_tuple[sObj.links]; +            comp_obj_block.has.inline_notes_reg               = substantive_obj_misc_struct.has_notes_reg; +            comp_obj_block.has.inline_notes_star              = substantive_obj_misc_struct.has_notes_star; +            comp_obj_block.has.inline_links                   = substantive_obj_misc_struct.has_links;              the_document_body_section                         ~= comp_obj_block;              tag_assoc                                         = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);            } @@ -3128,10 +3128,10 @@ struct retStruct_flow_table_substantive_munge {              heading_ptr-1,              an_object["is"]            ); -          TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +          ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct              = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -          an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -          anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +          an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +          anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;            comp_obj_block                                      = comp_obj_block.init;            comp_obj_block.metainfo.is_of_part                  = "body";            comp_obj_block.metainfo.is_of_section               = "body"; @@ -3145,9 +3145,9 @@ struct retStruct_flow_table_substantive_munge {            comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];            comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];            comp_obj_block.text                                 = an_object["substantive"]; -          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -          comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +          comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;            the_document_body_section                           ~= comp_obj_block;            tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);            object_reset(an_object); @@ -3166,10 +3166,10 @@ struct retStruct_flow_table_substantive_munge {            debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); }            processing.remove("verse");            an_object["is"]                                     = "verse"; -          TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +          ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct              = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -          an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -          anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +          an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +          anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;            comp_obj_block                                      = comp_obj_block.init;            comp_obj_block.metainfo.is_of_part                  = "body";            comp_obj_block.metainfo.is_of_section               = "body"; @@ -3183,9 +3183,9 @@ struct retStruct_flow_table_substantive_munge {            comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];            comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];            comp_obj_block.text                                 = an_object["substantive"]; -          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -          comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +          comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;            the_document_body_section                           ~= comp_obj_block;            tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);            object_number_poem["end"]                           = obj_cite_digits.object_number.to!string; @@ -3228,10 +3228,10 @@ struct retStruct_flow_table_substantive_munge {                heading_ptr-1,                an_object["is"]              ); -          TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +          ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct              = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -          an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -          anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +          an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +          anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;            comp_obj_block                                      = comp_obj_block.init;            comp_obj_block.metainfo.is_of_part                  = "body";            comp_obj_block.metainfo.is_of_section               = "body"; @@ -3245,9 +3245,9 @@ struct retStruct_flow_table_substantive_munge {            comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];            comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];            comp_obj_block.text                                 = an_object["substantive"]; -          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -          comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +          comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +          comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +          comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;            the_document_body_section                           ~= comp_obj_block;            tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);            object_reset(an_object); @@ -3257,7 +3257,7 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_txt_by_line_block_poem ret; +  ST_txt_by_line_block_poem ret;    {      ret.cntr        = cntr;      ret.pith        = pith; @@ -3265,7 +3265,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_txt_by_line_block_generic txt_by_line_block_code()( +@safe ST_txt_by_line_block_generic txt_by_line_block_code()(    char[]          line,    string[string]  an_object,    uint[string]    pith, @@ -3300,7 +3300,7 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_txt_by_line_block_generic ret; +  ST_txt_by_line_block_generic ret;    {      ret.pith        = pith;      ret.this_object = an_object; @@ -3365,12 +3365,12 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  struct retStruct_txt_by_line_block_table { +  struct ST_txt_by_line_block_table {      CMM             conf_make_meta;      uint[string]    pith;      string[string]  this_object;    } -  retStruct_txt_by_line_block_table ret; +  ST_txt_by_line_block_table ret;    {      ret.conf_make_meta = conf_make_meta,      ret.pith           = pith; @@ -3378,7 +3378,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@system retStruct_txt_by_line_block_biblio txt_by_line_block_biblio( +@system ST_txt_by_line_block_biblio txt_by_line_block_biblio(    char[]                  line,    uint[string] pith,    int          bib_entry, @@ -3504,7 +3504,7 @@ struct retStruct_flow_table_substantive_munge {      }      header_tag_value        = "";    } -  retStruct_txt_by_line_block_biblio ret; +  ST_txt_by_line_block_biblio ret;    {      ret.pith                  = pith;      ret.bib_entry             = bib_entry; @@ -3610,7 +3610,7 @@ struct retStruct_flow_table_substantive_munge {    }    return line;  } -@system retStruct_flow_table_closed_make_special_notation_table flow_table_closed_make_special_notation_table_(CMM)( +@system ST_flow_table_closed_make_special_notation_table flow_table_closed_make_special_notation_table_(CMM)(    char[]                line,    string[string]        an_object,    ObjGenericComposite[] the_document_body_section, @@ -3633,9 +3633,9 @@ struct retStruct_flow_table_substantive_munge {        "table"      );    an_object["is"]                                             = "table"; -  TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +  ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct      = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta, No._new_doc); -  an_object["substantive"]                                    = substantive_obj_misc_tuple[sObj.content]; +  an_object["substantive"]                                    = substantive_obj_misc_struct.obj_txt;    comp_obj_block.metainfo.ocn                                 = obj_cite_digits.object_number;    comp_obj_block.metainfo.identifier                          = obj_cite_digits.identifier;    comp_obj_block.metainfo.object_number_off                   = obj_cite_digits.off; @@ -3655,7 +3655,7 @@ struct retStruct_flow_table_substantive_munge {    object_reset(an_object);    processing.remove("verse");    ++cntr; -  retStruct_flow_table_closed_make_special_notation_table ret; +  ST_flow_table_closed_make_special_notation_table ret;    {      ret.this_object               = an_object;      ret.the_document_body_section = the_document_body_section; @@ -3666,7 +3666,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@system retStruct_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)( +@system ST_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)(    char[]                   line,    string[string]           an_object,    B                        bookindex_extract_hash, @@ -3713,10 +3713,10 @@ struct retStruct_flow_table_substantive_munge {            heading_ptr-1,            an_object["is"]          ); -      TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct          = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -      an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -      anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +      an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +      anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;        comp_obj_block                                          = comp_obj_block.init;        comp_obj_block.metainfo.is_of_part                      = "body";        comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3732,9 +3732,9 @@ struct retStruct_flow_table_substantive_munge {        comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];        comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];        comp_obj_block.text                                     = an_object["substantive"]; -      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -      comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +      comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;        the_document_body_section                               ~= comp_obj_block;        tag_assoc                                               = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);        pith["block_is"]                                        = eN.blk_is.quote; @@ -3765,10 +3765,10 @@ struct retStruct_flow_table_substantive_munge {            heading_ptr-1,            an_object["is"]          ); -      TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct          = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -      an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -      anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +      an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +      anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;        comp_obj_block                                          = comp_obj_block.init;        comp_obj_block.metainfo.is_of_part                      = "body";        comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3784,9 +3784,9 @@ struct retStruct_flow_table_substantive_munge {        comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];        comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];        comp_obj_block.text                                     = an_object["substantive"]; -      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -      comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +      comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;        the_document_body_section                               ~= comp_obj_block;        tag_assoc                                               = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);        pith["block_is"]                                        = eN.blk_is.poem; @@ -3817,10 +3817,10 @@ struct retStruct_flow_table_substantive_munge {            heading_ptr-1,            an_object["is"]          ); -      TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct          = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -      an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -      // anchor_tag                                           = substantive_obj_misc_tuple[sObj.anchor_tag]; +      an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +      // anchor_tag                                           = substantive_obj_misc_struct.anchor_tag; // check        comp_obj_block                                          = comp_obj_block.init;        comp_obj_block.metainfo.is_of_part                      = "body";        comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3836,9 +3836,9 @@ struct retStruct_flow_table_substantive_munge {        comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];        comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];        comp_obj_block.text                                     = an_object["substantive"]; -      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -      comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +      comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +      comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +      comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;        the_document_body_section                               ~= comp_obj_block;        pith["block_is"]                                        = eN.blk_is.block;        pith["block_state"]                                     = eN.blk_state.off; @@ -3906,10 +3906,10 @@ struct retStruct_flow_table_substantive_munge {            heading_ptr-1,            an_object["is"]          ); -      TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct          = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -      an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -      anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +      an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +      anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;        comp_obj_code                                           = comp_obj_code.init;        comp_obj_code.metainfo.is_of_part                       = "body";        comp_obj_code.metainfo.is_of_section                    = "body"; @@ -3926,9 +3926,9 @@ struct retStruct_flow_table_substantive_munge {        comp_obj_code.tags.html_segment_anchor_tag_is           = tag_in_seg["seg_lv4"];        comp_obj_code.tags.epub_segment_anchor_tag_is           = tag_in_seg["seg_lv1to4"];        comp_obj_code.text                                      = an_object["substantive"]; -      comp_obj_code.has.inline_notes_reg                      = substantive_obj_misc_tuple[sObj.notes_reg]; -      comp_obj_code.has.inline_notes_star                     = substantive_obj_misc_tuple[sObj.notes_star]; -      comp_obj_code.has.inline_links                          = substantive_obj_misc_tuple[sObj.links]; +      comp_obj_code.has.inline_notes_reg                      = substantive_obj_misc_struct.has_notes_reg; +      comp_obj_code.has.inline_notes_star                     = substantive_obj_misc_struct.has_notes_star; +      comp_obj_code.has.inline_links                          = substantive_obj_misc_struct.has_links;        the_document_body_section                               ~= comp_obj_code;        pith["block_is"]                                        = eN.blk_is.code;        pith["block_state"]                                     = eN.blk_state.off; @@ -3959,9 +3959,9 @@ struct retStruct_flow_table_substantive_munge {            heading_ptr-1,            an_object["is"]          ); -      TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct          = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -      an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; +      an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt;        comp_obj_block                                          = comp_obj_block.init;        comp_obj_block.metainfo.ocn                             = obj_cite_digits.object_number;        comp_obj_block.metainfo.identifier                      = obj_cite_digits.identifier; @@ -3987,7 +3987,7 @@ struct retStruct_flow_table_substantive_munge {        ++cntr;      }    } -  retStruct_flow_block_flag_line_empty ret; +  ST_flow_block_flag_line_empty ret;    {      ret.this_object                = an_object;      ret.the_document_body_section  = the_document_body_section; @@ -3999,7 +3999,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@system retStruct_flow_book_index flow_book_index_(B)( +@system ST_flow_book_index flow_book_index_(B)(    char[]          line,    string[string]  an_object,    string          book_idx_tmp, @@ -4036,7 +4036,7 @@ struct retStruct_flow_table_substantive_munge {        }      }    } -  retStruct_flow_book_index ret; +  ST_flow_book_index ret;    {      ret.this_object    = an_object;      ret.pith           = pith; @@ -4044,7 +4044,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_flow_heading_found flow_heading_found_()( +@safe ST_flow_heading_found flow_heading_found_()(    char[]                line,    string[string]        heading_match_str,    string[]              _make_unmarked_headings, @@ -4121,7 +4121,7 @@ struct retStruct_flow_table_substantive_munge {      }      pith["make_headings"] = eN.bi.on;    } -  retStruct_flow_heading_found ret; +  ST_flow_heading_found ret;    {      ret.heading_match_str = heading_match_str;      ret.heading_match_rgx = heading_match_rgx; @@ -4129,7 +4129,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_flow_heading_make_set flow_heading_make_set_()( +@safe ST_flow_heading_make_set flow_heading_make_set_()(               char[]                line,               int[string]           line_occur,    return ref Regex!(char)[string]  heading_match_rgx, @@ -4169,7 +4169,7 @@ struct retStruct_flow_table_substantive_munge {        debug(headingsfound) { writeln(line); }      }    } -  retStruct_flow_heading_make_set ret; +  ST_flow_heading_make_set ret;    {      ret.line           = line;      ret.pith           = pith; @@ -4345,7 +4345,7 @@ struct retStruct_flow_table_substantive_munge {      an_object["dummy_heading_status"] = (pith["dummy_heading_status"] == eN.bi.off) ? "f" : "t";      debug(heading) { writeln(line.strip); }    } -  struct retStruct_flow_heading_matched { +  struct ST_flow_heading_matched {      string[string]  this_object;      int[string]     line_occur;      string          an_object_key; @@ -4354,7 +4354,7 @@ struct retStruct_flow_table_substantive_munge {      uint[string]    pith;      CMM             conf_make_meta;    } -  retStruct_flow_heading_matched ret; +  ST_flow_heading_matched ret;    {      ret.this_object    = an_object;      ret.line_occur     = line_occur; @@ -4366,7 +4366,7 @@ struct retStruct_flow_table_substantive_munge {    }    return ret;  } -@safe retStruct_flow_para_match flow_para_match_()( +@safe ST_flow_para_match flow_para_match_()(    char[]         line,    string[string]  an_object,    string          an_object_key, @@ -4409,7 +4409,7 @@ struct retStruct_flow_table_substantive_munge {      }      ++line_occur["para"];    } -  retStruct_flow_para_match ret; +  ST_flow_para_match ret;    {      ret.pith            = pith;      ret.this_object     = an_object; @@ -4467,7 +4467,7 @@ struct retStruct_flow_table_substantive_munge {    }    return table_object;  } -@safe retStruct_flow_table_array_munge flow_table_array_munge()( +@safe ST_flow_table_array_munge flow_table_array_munge()(    ObjGenericComposite  table_object,    string[][]           table_array,  ) { @@ -4573,14 +4573,14 @@ struct retStruct_flow_table_substantive_munge {        _table_substantive);    }    table_object.text = _table_substantive; -  retStruct_flow_table_array_munge ret; +  ST_flow_table_array_munge ret;    {      ret.table_object      = table_object;      ret.table_array       = table_array;    }    return ret;  } -@system retStruct_flow_table_substantive_munge flow_table_substantive_munge()( +@system ST_flow_table_substantive_munge flow_table_substantive_munge()(    ObjGenericComposite  table_object,    string               table_substantive,  ) { @@ -4600,14 +4600,14 @@ struct retStruct_flow_table_substantive_munge {        _table_array = _get.table_array; // what do you do with this? how is this passed down?      }    } -  retStruct_flow_table_substantive_munge ret; +  ST_flow_table_substantive_munge ret;    {      ret.table_object      = table_object;      ret.table_substantive = table_substantive; // has anything been changed here?    }    return ret;  } -@system retStruct_flow_table_substantive_munge flow_table_substantive_munge_special()( +@system ST_flow_table_substantive_munge flow_table_substantive_munge_special()(    ObjGenericComposite  table_object,    string               table_substantive,  ) { @@ -4627,7 +4627,7 @@ struct retStruct_flow_table_substantive_munge {        _table_array = _get.table_array;      }    } -  retStruct_flow_table_substantive_munge ret; +  ST_flow_table_substantive_munge ret;    {      ret.table_object      = table_object;      ret.table_substantive = table_substantive; @@ -4722,7 +4722,7 @@ struct retStruct_flow_table_substantive_munge {      }      return obj_txt_in;    } -  @safe TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) { +  @safe ST_txtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) {      // endnotes (regular)      bool flg_notes_reg  = false;      bool flg_notes_star = false; @@ -4785,15 +4785,16 @@ struct retStruct_flow_table_substantive_munge {      } else {        obj_txt_out = obj_txt_in;      } -    TxtPlusHasFootnotes t = tuple( -      obj_txt_out, -      flg_notes_reg, -      flg_notes_star, -      flg_notes_plus, -    ); -    return t; +    ST_txtPlusHasFootnotes ret; +    { +      ret.obj_txt            = obj_txt_out; +      ret.has_notes_reg      = flg_notes_reg; +      ret.has_notes_star     = flg_notes_star; +      ret.has_notes_plus     = flg_notes_plus; +    } +    return ret;    } -  @safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()( +  @safe private ST_txtPlusHasFootnotesUrlsImages object_notes_and_links_()(      string obj_txt_in,      bool reset_note_numbers = false    ) { @@ -4827,7 +4828,7 @@ struct retStruct_flow_table_substantive_munge {        obj_txt_in = obj_txt_in          .replaceAll(rgx.para_inline_link_anchor, "┃$1┃");      } -    TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers); +    ST_txtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);      obj_txt_out = ftn.obj_txt;      debug(footnotes) { writeln(obj_txt_out, tail); }      obj_txt_out = obj_txt_out ~ tail; @@ -4837,23 +4838,39 @@ struct retStruct_flow_table_substantive_munge {          writeln(m.hit);        }      } -    TxtPlusHasFootnotesUrlsImages t = tuple( -      obj_txt_out, -      ftn.has_notes_reg, -      ftn.has_notes_star, -      ftn.has_notes_plus, -      urls, -      images_without_dimensions, -    ); -    return t; +    ST_txtPlusHasFootnotesUrlsImages ret; +    { +      ret.obj_txt                       = obj_txt_out; +      ret.has_notes_reg                 = ftn.has_notes_reg; +      ret.has_notes_star                = ftn.has_notes_star; +      ret.has_notes_plus                = ftn.has_notes_plus; +      ret.has_urls                      = urls; +      ret.has_images_without_dimensions = images_without_dimensions; +    } +    return ret;    } -  auto init() { -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(""); -    return t; +  @safe private ST_txtPlusHasFootnotesUrlsImages object_only_()( +    string obj_txt_in, +    bool reset_note_numbers = false +  ) { +    ST_txtPlusHasFootnotesUrlsImages ret; +    { +      ret.obj_txt                       = obj_txt_in; +      ret.has_notes_reg                 = false; +      ret.has_notes_star                = false; +      ret.has_notes_plus                = false; +      ret.has_urls                      = false; +      ret.has_images_without_dimensions = false; +    } +    return ret; +  } +  ST_txtPlusHasFootnotesUrlsImages init() { +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(""); +    return ret;    }    invariant() {    } -  @safe auto munge_heading()( +  @safe ST_txtPlusHasFootnotesUrlsImages munge_heading()(      string obj_txt_in,      bool reset_note_numbers = false    ) { @@ -4862,72 +4879,64 @@ struct retStruct_flow_table_substantive_munge {       .replaceFirst(rgx.object_number_off_all, "")       .replaceFirst(rgx.markup_inline_linebreak, mkup.br_line_inline)       .strip; -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); -    debug(munge) { -      writeln(__LINE__); -      writeln(obj_txt_in); -      writeln(__LINE__); -      writeln(obj_txt["munge"].to!string); -    } -    return t; +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); +    debug(munge) { writeln(__LINE__); writeln(obj_txt_in); writeln(__LINE__); writeln(obj_txt["munge"].to!string); } +    return ret;    }    invariant() {    } -  @safe auto munge_para()(string obj_txt_in) { +  @safe ST_txtPlusHasFootnotesUrlsImages munge_para()(string obj_txt_in) {      obj_txt["munge"] = (obj_txt_in)        .replaceFirst(rgx.para_attribs, "")        .replaceFirst(rgx.object_number_off_all, "")        .replaceFirst(rgx.markup_inline_linebreak, mkup.br_line_inline); -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); -    debug(munge) { -      writeln(__LINE__); -      writeln(obj_txt_in); +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt["munge"]); +    debug(munge) { writeln(__LINE__); writeln(obj_txt_in);        writeln(__LINE__);        writeln(obj_txt["munge"].to!string);      } -    return t; +    return ret;    } -  @safe auto munge_quote()(string obj_txt_in) { -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n")); -    // TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -    return t; +  @safe ST_txtPlusHasFootnotesUrlsImages munge_quote()(string obj_txt_in) { +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n")); +    return ret;    }    invariant() {    } -  @safe auto munge_group(string obj_txt_in) { -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join("\n" ~ mkup.br_line_spaced ~ "\n")); // br_line br_line_inline br_line_spaced -    return t; +  @safe ST_txtPlusHasFootnotesUrlsImages munge_group(string obj_txt_in) { +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in.split("\n\n").join("\n" ~ mkup.br_line_spaced ~ "\n")); +    return ret;    }    invariant() {    } -  @safe auto munge_block()(string obj_txt_in) { -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -    return t; +  @safe ST_txtPlusHasFootnotesUrlsImages munge_block()(string obj_txt_in) { +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +    return ret;    }    invariant() {    }    @safe auto munge_verse()(string obj_txt_in) { -    TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -    return t; +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +    return ret;    }    invariant() {    } -  @safe string munge_code()(string obj_txt_in) { +  @safe ST_txtPlusHasFootnotesUrlsImages munge_code()(string obj_txt_in) {      obj_txt_in = obj_txt_in.replaceAll(rgx.space, mkup.nbsp); -    obj_txt["munge"] = obj_txt_in; -    return obj_txt["munge"]; +    ST_txtPlusHasFootnotesUrlsImages ret = object_only_(obj_txt_in); +    return ret;    }    invariant() {    } -  @safe string munge_table()(string obj_txt_in) { -    obj_txt["munge"] = obj_txt_in; -    return obj_txt["munge"]; +  @safe ST_txtPlusHasFootnotesUrlsImages munge_table()(string obj_txt_in) { +    ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +    return ret;    }    invariant() {    } -  @safe string munge_comment()(string obj_txt_in) { -    obj_txt["munge"] = obj_txt_in; -    return obj_txt["munge"]; +  @safe ST_txtPlusHasFootnotesUrlsImages munge_comment()(string obj_txt_in) { +    ST_txtPlusHasFootnotesUrlsImages ret = object_only_(obj_txt_in); +    return ret;    }    invariant() {    } @@ -4937,7 +4946,7 @@ static struct ObjInlineMarkup {    static auto munge = ObjInlineMarkupMunge();    string[string] obj_txt;    string anchor_tag = ""; -  @safe TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)( +  @safe ST_txtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(      string[string]   obj_,      string           obj_key_,      CMM              conf_make_meta, @@ -4951,11 +4960,14 @@ static struct ObjInlineMarkup {        anchor_tag = "";      }      auto x = munge.init; -    bool[string] obj_notes_and_links; -    obj_notes_and_links["notes_reg"]                = false; -    obj_notes_and_links["notes_star"]               = false; -    obj_notes_and_links["links"]                    = false; -    obj_notes_and_links["image_no_dimensions"]      = false; +    ST_txtAndAnchorTagPlusHasFootnotesUrlsImages ret; +    ret.obj_txt                       = ""; +    ret.anchor_tag                    = ""; +    ret.has_notes_reg                 = false; +    ret.has_notes_star                = false; +    ret.has_notes_plus                = false; +    ret.has_links                     = false; +    ret.has_images_without_dimensions = false;      if ((obj_["is"] == "para")        || (obj_["is"] == "heading")        || (obj_["is"] == "quote") @@ -4996,37 +5008,30 @@ static struct ObjInlineMarkup {        x                                             = munge.munge_verse(obj_txt["munge"]);        goto default;      case "code": -      obj_txt["munge"]                              = munge.munge_code(obj_txt["munge"]); -      break; +      x                                             = munge.munge_code(obj_txt["munge"]); +      goto default;      case "table": -      obj_txt["munge"]                              = munge.munge_table(obj_txt["munge"]); -      break; +      x                                             = munge.munge_table(obj_txt["munge"]); +      goto default;      case "comment": -      obj_txt["munge"]                              = munge.munge_comment(obj_txt["munge"]); -      break; +      x                                             = munge.munge_comment(obj_txt["munge"]); +      goto default;      case "doc_end_reset":        munge.initialize_note_numbers();        break;      default: -      /+ para, heading, group, block, verse +/ -      obj_txt["munge"]                              = x[0]; -      obj_notes_and_links["notes_reg"]              = x[1]; -      obj_notes_and_links["notes_star"]             = x[2]; -      obj_notes_and_links["notes_plus"]             = x[3]; -      obj_notes_and_links["links"]                  = x[4]; -      obj_notes_and_links["image_no_dimensions"]    = x[5]; +      // para, heading, group, block, verse +      ret.obj_txt                       = x.obj_txt; +      ret.anchor_tag                    = anchor_tag; +      ret.has_notes_reg                 = x.has_notes_reg; +      ret.has_notes_star                = x.has_notes_star; +      ret.has_notes_plus                = x.has_notes_plus; +      ret.has_links                     = x.has_urls; +      ret.has_images_without_dimensions = x.has_images_without_dimensions;        break;      } -    TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple( -      obj_txt["munge"], -      anchor_tag, -      obj_notes_and_links["notes_reg"], -      obj_notes_and_links["notes_star"], -      obj_notes_and_links["links"], -      obj_notes_and_links["image_no_dimensions"], -    );      anchor_tag = ""; -    return t; +    return ret;    }    invariant() {    } @@ -5037,7 +5042,7 @@ static struct ObjInlineMarkup {     heading_toc_ = (m.post).replaceAll(rgx.inline_notes_curly_gen, "");     return heading_toc_;    }; -  @safe retStruct_flow_table_of_contents_gather_headings flow_table_of_contents_gather_headings(CMM)( // +  @safe ST_flow_table_of_contents_gather_headings flow_table_of_contents_gather_headings(CMM)( //      string[string]         obj_,      CMM                    conf_make_meta,      string[string]         tag_in_seg, @@ -5120,7 +5125,7 @@ static struct ObjInlineMarkup {      default:        break;      } -    retStruct_flow_table_of_contents_gather_headings ret; +    ST_flow_table_of_contents_gather_headings ret;      {        ret.the_document_toc_section = the_document_toc_section;        ret.lev4_subtoc              = lev4_subtoc; @@ -5984,7 +5989,7 @@ struct NotesSection {    }  }  struct Bibliography { -  @system public retStruct_flow_bibliography flow_bibliography_()( +  @system public ST_flow_bibliography flow_bibliography_()(      string[]    biblio_unsorted_incomplete,      JSONValue[] bib_arr_json    ) { @@ -6007,7 +6012,7 @@ struct Bibliography {          cntr++;        }      } -    retStruct_flow_bibliography ret; +    ST_flow_bibliography ret;      {        ret.biblio_sorted  = biblio_sorted__;        ret.bib_arr_json  = bib_arr_json; diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index d8b3b75..e1779ad 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -193,28 +193,29 @@ template docAbstraction() {    int[] dom_structure_markedup_tags_status_buffer  = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];    int[] dom_structure_collapsed_tags_status        = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];    int[] dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; -  alias TxtPlusHasFootnotes = Tuple!( -    string, "obj_txt", -    bool,   "has_notes_reg", -    bool,   "has_notes_star", -    bool,   "has_notes_plus", -  ); -  alias TxtPlusHasFootnotesUrlsImages = Tuple!( -    string, "obj_txt", -    bool,   "has_notes_reg", -    bool,   "has_notes_star", -    bool,   "has_notes_plus", -    bool,   "has_urls", -    bool,   "has_images_without_dimensions", -  ); -  alias TxtAndAnchorTagPlusHasFootnotesUrlsImages = Tuple!( -     string, "obj_txt", -     string, "anchor_tag", -     bool,   "has_notes_reg", -     bool,   "has_notes_star", -     bool,   "has_links", -     bool,   "has_images_without_dimensions", -  ); +  struct  ST_txtPlusHasFootnotes { +    string           obj_txt; +    bool             has_notes_reg; +    bool             has_notes_star; +    bool             has_notes_plus; +  } +  struct ST_txtPlusHasFootnotesUrlsImages { +    string           obj_txt; +    bool             has_notes_reg; +    bool             has_notes_star; +    bool             has_notes_plus; +    bool             has_urls; +    bool             has_images_without_dimensions; +  } +  struct ST_txtAndAnchorTagPlusHasFootnotesUrlsImages { +    string           obj_txt; +    string           anchor_tag; +    bool             has_notes_reg; +    bool             has_notes_star; +    bool             has_notes_plus; +    bool             has_links; // use same name +    bool             has_images_without_dimensions; +  }    enum DomTags { none, open, close, close_and_open, open_still, }    @safe pure ObjGenericComposite obj_heading_ancestors()(      ObjGenericComposite  obj, @@ -413,7 +414,6 @@ template docAbstraction() {    // node    ObjGenericComposite comp_obj_heading, comp_obj_location, comp_obj_block, comp_obj_code, comp_obj_poem_ocn, comp_obj_comment;    auto node_construct = NodeStructureMetadata(); -  enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensions }    @safe string[string][string] inline_para_link_anchor()(      string[string]          an_object,      string[string]          tag_in_seg, @@ -430,47 +430,47 @@ template docAbstraction() {      }      return tag_assoc;    } -  struct retStruct_txt_by_line_common_reset { +  struct ST_txt_by_line_common_reset {      int[string]     line_occur;      string[string]  this_object;      uint[string]    pith;    } -  struct retStruct_txt_by_line_block_start { +  struct ST_txt_by_line_block_start {      uint[string]    pith;      uint[string]    dochas;      string[string]  object_number_poem;    } -  struct retStruct_txt_by_line_block_generic { +  struct ST_txt_by_line_block_generic {      uint[string]    pith;      string[string]  this_object;    } -  struct retStruct_txt_by_line_block_poem { +  struct ST_txt_by_line_block_poem {      int             cntr;      uint[string]    pith;      string[string]  this_object;    } -  struct retStruct_txt_by_line_block_biblio { +  struct ST_txt_by_line_block_biblio {      uint[string]    pith;      int             bib_entry;      string          biblio_entry_str_json;      string[]        biblio_arr_json;    } -  struct retStruct_flow_book_index { +  struct ST_flow_book_index {      string[string]  this_object;      uint[string]    pith;      string          book_idx_tmp;    } -  struct retStruct_flow_heading_found { +  struct ST_flow_heading_found {      string[string]       heading_match_str;      Regex!(char)[string] heading_match_rgx;      uint[string]         pith;    } -  struct retStruct_flow_heading_make_set { +  struct ST_flow_heading_make_set {      char[]          line;      uint[string]    pith;      string[string]  this_object;    } -  struct retStruct_flow_para_match { +  struct ST_flow_para_match {      uint[string]    pith;      string[string]  this_object;      string          this_object_key; @@ -478,20 +478,20 @@ template docAbstraction() {      bool            bullet;      int[string]     line_occur;    } -  struct retStruct_flow_table_array_munge { +  struct ST_flow_table_array_munge {      ObjGenericComposite table_object;      string[][]          table_array;    } -  struct retStruct_flow_table_of_contents_gather_headings { +  struct ST_flow_table_of_contents_gather_headings {      ObjGenericComposite[] the_document_toc_section;      string[][string]      lev4_subtoc;    } -  struct retStruct_flow_bibliography { +  struct ST_flow_bibliography {      JSONValue[] biblio_sorted;      JSONValue[] bib_arr_json;      string[]    biblio_unsorted_incomplete;    } -  struct retStruct_flow_table_closed_make_special_notation_table { +  struct ST_flow_table_closed_make_special_notation_table {      string[string]        this_object;      ObjGenericComposite[] the_document_body_section;      OCNset                obj_cite_digits; @@ -499,7 +499,7 @@ template docAbstraction() {      int                   cntr;      uint[string]          pith;    } -  struct retStruct_flow_block_flag_line_empty { +  struct ST_flow_block_flag_line_empty {      string[string]           this_object;      ObjGenericComposite[]    the_document_body_section;      string[][string][string] bookindex_unordered_hashes; @@ -508,7 +508,7 @@ template docAbstraction() {      int                      cntr;      uint[string]             pith;    } -  struct retStruct_flow_table_substantive_munge { +  struct ST_flow_table_substantive_munge {      ObjGenericComposite  table_object;      string               table_substantive;    } @@ -1286,10 +1286,10 @@ template docAbstraction() {                  : ocn_emit(pith["ocn"]);                  an_object["is"] = "heading";                  an_object_key = "body_nugget"; -                TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_tuple +                ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_struct                    = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, ((_new_doc) ? Yes._new_doc : No._new_doc)); -                an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content]; -                anchor_tag = substantive_object_and_anchor_tags_tuple[sObj.anchor_tag]; +                an_object["substantive"] = substantive_object_and_anchor_tags_struct.obj_txt; +                anchor_tag = substantive_object_and_anchor_tags_struct.anchor_tag;                  if (_new_doc) {                    cnt1 = 1;                    cnt2 = 1; @@ -1389,9 +1389,9 @@ template docAbstraction() {                      lv_ancestors_txt,                             // string[]                      an_object["is"],                              // string                      html_segnames_ptr,                            // int -                    substantive_object_and_anchor_tags_tuple[sObj.notes_reg], -                    substantive_object_and_anchor_tags_tuple[sObj.notes_star], -                    substantive_object_and_anchor_tags_tuple[sObj.links], +                    substantive_object_and_anchor_tags_struct.has_notes_reg, +                    substantive_object_and_anchor_tags_struct.has_notes_star, +                    substantive_object_and_anchor_tags_struct.has_links,                    );                  ++heading_ptr;                  debug(segments) { @@ -1433,10 +1433,10 @@ template docAbstraction() {                      heading_ptr-1,                      an_object["is"],                    ); -                TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +                ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                    = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -                an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; -                anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag]; +                an_object["substantive"] = substantive_obj_misc_struct.obj_txt; +                anchor_tag = substantive_obj_misc_struct.anchor_tag;                  comp_obj_para                                       = comp_obj_para.init;                  comp_obj_para.metainfo.is_of_part                   = "body";                  comp_obj_para.metainfo.is_of_section                = "body"; @@ -1454,10 +1454,10 @@ template docAbstraction() {                  comp_obj_para.attrib.indent_base                    = indent["base_position"];                  comp_obj_para.attrib.bullet                         = bullet;                  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]; -                comp_obj_para.has.image_without_dimensions          = substantive_obj_misc_tuple[sObj.image_no_dimensions]; +                comp_obj_para.has.inline_notes_reg                  = substantive_obj_misc_struct.has_notes_reg; +                comp_obj_para.has.inline_notes_star                 = substantive_obj_misc_struct.has_notes_star; +                comp_obj_para.has.inline_links                      = substantive_obj_misc_struct.has_links; +                comp_obj_para.has.image_without_dimensions          = substantive_obj_misc_struct.has_images_without_dimensions;                  the_document_body_section                           ~= comp_obj_para;                  tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);                  { @@ -2756,18 +2756,18 @@ template docAbstraction() {      @safe auto doc_has() {        return DocHas_();      } -    struct retStruct_docAbstraction { +    struct ST_docAbstraction {        ObjGenericComposite[][string] document_the;        DocHas_                       doc_has;      } -    retStruct_docAbstraction ret; +    ST_docAbstraction ret;      {        ret.document_the = document_the;        ret.doc_has      = doc_has;      }      return ret;    } // ← closed: abstract doc source -  @system retStruct_txt_by_line_common_reset txt_by_line_common_reset_()( +  @system ST_txt_by_line_common_reset txt_by_line_common_reset_()(      int[string]     line_occur,      string[string]  an_object,      uint[string]    pith, @@ -2776,7 +2776,7 @@ template docAbstraction() {      line_occur["para"]                                  = eN.bi.off;      pith["txt_is"]                                      = eN.txt_is.off;      an_object                                           = an_object.object_reset; -    retStruct_txt_by_line_common_reset ret; +    ST_txt_by_line_common_reset ret;      {        ret.line_occur  = line_occur;        ret.this_object = an_object; @@ -2784,7 +2784,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_txt_by_line_block_start txt_by_line_block_start()( +  @safe ST_txt_by_line_block_start txt_by_line_block_start()(      char[]         line,      uint[string]   pith,      uint[string]   dochas, @@ -2910,7 +2910,7 @@ template docAbstraction() {        pith["block_state"]             = eN.blk_state.on;        pith["block_delim"]             = eN.blk_delim.tic;      } -    retStruct_txt_by_line_block_start ret; +    ST_txt_by_line_block_start ret;      {        ret.pith               = pith;        ret.dochas             = dochas; @@ -2918,7 +2918,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_txt_by_line_block_generic txt_by_line_block_quote()( +  @safe ST_txt_by_line_block_generic txt_by_line_block_quote()(      char[]          line,      string[string]  an_object,      uint[string]    pith, @@ -2949,14 +2949,14 @@ template docAbstraction() {          }        }      } -    retStruct_txt_by_line_block_generic ret; +    ST_txt_by_line_block_generic ret;      {        ret.pith        = pith;        ret.this_object = an_object;      }      return ret;    } -  @safe retStruct_txt_by_line_block_generic txt_by_line_block_group()( +  @safe ST_txt_by_line_block_generic txt_by_line_block_group()(      char[]          line,      string[string]  an_object,      uint[string]    pith, @@ -2987,14 +2987,14 @@ template docAbstraction() {          }        }      } -    retStruct_txt_by_line_block_generic ret; +    ST_txt_by_line_block_generic ret;      {        ret.pith        = pith;        ret.this_object = an_object;      }      return ret;    } -  @safe retStruct_txt_by_line_block_generic txt_by_line_block_block()( +  @safe ST_txt_by_line_block_generic txt_by_line_block_block()(      char[]          line,      string[string]  an_object,      uint[string]    pith, @@ -3025,14 +3025,14 @@ template docAbstraction() {          }        }      } -    retStruct_txt_by_line_block_generic ret; +    ST_txt_by_line_block_generic ret;      {        ret.pith        = pith;        ret.this_object = an_object;      }      return ret;    } -  @safe retStruct_txt_by_line_block_poem txt_by_line_block_poem(CMM)( +  @safe ST_txt_by_line_block_poem txt_by_line_block_poem(CMM)(      char[]          line,      string[string]  an_object,      uint[string]    pith, @@ -3059,10 +3059,10 @@ template docAbstraction() {              if (an_object.length > 0) {                debug(poem) { writeln( obj_cite_digits.object_number, an_object[an_object_key]); }                an_object["is"]                                   = "verse"; -              TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +              ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                  = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -              an_object["substantive"]                          = substantive_obj_misc_tuple[sObj.content]; -              anchor_tag                                        = substantive_obj_misc_tuple[sObj.anchor_tag]; +              an_object["substantive"]                          = substantive_obj_misc_struct.obj_txt; +              anchor_tag                                        = substantive_obj_misc_struct.anchor_tag;                comp_obj_block                                    = comp_obj_block.init;                comp_obj_block.metainfo.is_of_part                = "body";                comp_obj_block.metainfo.is_of_section             = "body"; @@ -3076,9 +3076,9 @@ template docAbstraction() {                comp_obj_block.tags.html_segment_anchor_tag_is    = tag_in_seg["seg_lv4"];                comp_obj_block.tags.epub_segment_anchor_tag_is    = tag_in_seg["seg_lv1to4"];                comp_obj_block.text                               = an_object["substantive"]; -              comp_obj_block.has.inline_notes_reg               = substantive_obj_misc_tuple[sObj.notes_reg]; -              comp_obj_block.has.inline_notes_star              = substantive_obj_misc_tuple[sObj.notes_star]; -              comp_obj_block.has.inline_links                   = substantive_obj_misc_tuple[sObj.links]; +              comp_obj_block.has.inline_notes_reg               = substantive_obj_misc_struct.has_notes_reg; +              comp_obj_block.has.inline_notes_star              = substantive_obj_misc_struct.has_notes_star; +              comp_obj_block.has.inline_links                   = substantive_obj_misc_struct.has_links;                the_document_body_section                         ~= comp_obj_block;                tag_assoc                                         = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);              } @@ -3121,10 +3121,10 @@ template docAbstraction() {                heading_ptr-1,                an_object["is"]              ); -            TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +            ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -            an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -            anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +            an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +            anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;              comp_obj_block                                      = comp_obj_block.init;              comp_obj_block.metainfo.is_of_part                  = "body";              comp_obj_block.metainfo.is_of_section               = "body"; @@ -3138,9 +3138,9 @@ template docAbstraction() {              comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];              comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];              comp_obj_block.text                                 = an_object["substantive"]; -            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -            comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +            comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;              the_document_body_section                           ~= comp_obj_block;              tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);              object_reset(an_object); @@ -3159,10 +3159,10 @@ template docAbstraction() {              debug(poem) { writeln(__LINE__); writeln(obj_cite_digits.object_number, line); }              processing.remove("verse");              an_object["is"]                                     = "verse"; -            TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +            ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -            an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -            anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +            an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +            anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;              comp_obj_block                                      = comp_obj_block.init;              comp_obj_block.metainfo.is_of_part                  = "body";              comp_obj_block.metainfo.is_of_section               = "body"; @@ -3176,9 +3176,9 @@ template docAbstraction() {              comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];              comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];              comp_obj_block.text                                 = an_object["substantive"]; -            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -            comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +            comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;              the_document_body_section                           ~= comp_obj_block;              tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);              object_number_poem["end"]                           = obj_cite_digits.object_number.to!string; @@ -3221,10 +3221,10 @@ template docAbstraction() {                  heading_ptr-1,                  an_object["is"]                ); -            TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +            ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct                = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -            an_object["substantive"]                            = substantive_obj_misc_tuple[sObj.content]; -            anchor_tag                                          = substantive_obj_misc_tuple[sObj.anchor_tag]; +            an_object["substantive"]                            = substantive_obj_misc_struct.obj_txt; +            anchor_tag                                          = substantive_obj_misc_struct.anchor_tag;              comp_obj_block                                      = comp_obj_block.init;              comp_obj_block.metainfo.is_of_part                  = "body";              comp_obj_block.metainfo.is_of_section               = "body"; @@ -3238,9 +3238,9 @@ template docAbstraction() {              comp_obj_block.tags.html_segment_anchor_tag_is      = tag_in_seg["seg_lv4"];              comp_obj_block.tags.epub_segment_anchor_tag_is      = tag_in_seg["seg_lv1to4"];              comp_obj_block.text                                 = an_object["substantive"]; -            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_tuple[sObj.notes_reg]; -            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_tuple[sObj.notes_star]; -            comp_obj_block.has.inline_links                     = substantive_obj_misc_tuple[sObj.links]; +            comp_obj_block.has.inline_notes_reg                 = substantive_obj_misc_struct.has_notes_reg; +            comp_obj_block.has.inline_notes_star                = substantive_obj_misc_struct.has_notes_star; +            comp_obj_block.has.inline_links                     = substantive_obj_misc_struct.has_links;              the_document_body_section                           ~= comp_obj_block;              tag_assoc                                           = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);              object_reset(an_object); @@ -3250,7 +3250,7 @@ template docAbstraction() {          }        }      } -    retStruct_txt_by_line_block_poem ret; +    ST_txt_by_line_block_poem ret;      {        ret.cntr        = cntr;        ret.pith        = pith; @@ -3258,7 +3258,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_txt_by_line_block_generic txt_by_line_block_code()( +  @safe ST_txt_by_line_block_generic txt_by_line_block_code()(      char[]          line,      string[string]  an_object,      uint[string]    pith, @@ -3293,7 +3293,7 @@ template docAbstraction() {          }        }      } -    retStruct_txt_by_line_block_generic ret; +    ST_txt_by_line_block_generic ret;      {        ret.pith        = pith;        ret.this_object = an_object; @@ -3358,12 +3358,12 @@ template docAbstraction() {          }        }      } -    struct retStruct_txt_by_line_block_table { +    struct ST_txt_by_line_block_table {        CMM             conf_make_meta;        uint[string]    pith;        string[string]  this_object;      } -    retStruct_txt_by_line_block_table ret; +    ST_txt_by_line_block_table ret;      {        ret.conf_make_meta = conf_make_meta,        ret.pith           = pith; @@ -3371,7 +3371,7 @@ template docAbstraction() {      }      return ret;    } -  @system retStruct_txt_by_line_block_biblio txt_by_line_block_biblio( +  @system ST_txt_by_line_block_biblio txt_by_line_block_biblio(      char[]                  line,      uint[string] pith,      int          bib_entry, @@ -3497,7 +3497,7 @@ template docAbstraction() {        }        header_tag_value        = "";      } -    retStruct_txt_by_line_block_biblio ret; +    ST_txt_by_line_block_biblio ret;      {        ret.pith                  = pith;        ret.bib_entry             = bib_entry; @@ -3603,7 +3603,7 @@ template docAbstraction() {      }      return line;    } -  @system retStruct_flow_table_closed_make_special_notation_table flow_table_closed_make_special_notation_table_(CMM)( +  @system ST_flow_table_closed_make_special_notation_table flow_table_closed_make_special_notation_table_(CMM)(      char[]                line,      string[string]        an_object,      ObjGenericComposite[] the_document_body_section, @@ -3626,9 +3626,9 @@ template docAbstraction() {          "table"        );      an_object["is"]                                             = "table"; -    TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +    ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct        = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta, No._new_doc); -    an_object["substantive"]                                    = substantive_obj_misc_tuple[sObj.content]; +    an_object["substantive"]                                    = substantive_obj_misc_struct.obj_txt;      comp_obj_block.metainfo.ocn                                 = obj_cite_digits.object_number;      comp_obj_block.metainfo.identifier                          = obj_cite_digits.identifier;      comp_obj_block.metainfo.object_number_off                   = obj_cite_digits.off; @@ -3648,7 +3648,7 @@ template docAbstraction() {      object_reset(an_object);      processing.remove("verse");      ++cntr; -    retStruct_flow_table_closed_make_special_notation_table ret; +    ST_flow_table_closed_make_special_notation_table ret;      {        ret.this_object               = an_object;        ret.the_document_body_section = the_document_body_section; @@ -3659,7 +3659,7 @@ template docAbstraction() {      }      return ret;    } -  @system retStruct_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)( +  @system ST_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)(      char[]                   line,      string[string]           an_object,      B                        bookindex_extract_hash, @@ -3706,10 +3706,10 @@ template docAbstraction() {              heading_ptr-1,              an_object["is"]            ); -        TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +        ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct            = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -        an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -        anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +        an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +        anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;          comp_obj_block                                          = comp_obj_block.init;          comp_obj_block.metainfo.is_of_part                      = "body";          comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3725,9 +3725,9 @@ template docAbstraction() {          comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];          comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];          comp_obj_block.text                                     = an_object["substantive"]; -        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -        comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +        comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;          the_document_body_section                               ~= comp_obj_block;          tag_assoc                                               = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);          pith["block_is"]                                        = eN.blk_is.quote; @@ -3758,10 +3758,10 @@ template docAbstraction() {              heading_ptr-1,              an_object["is"]            ); -        TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +        ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct            = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -        an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -        anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +        an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +        anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;          comp_obj_block                                          = comp_obj_block.init;          comp_obj_block.metainfo.is_of_part                      = "body";          comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3777,9 +3777,9 @@ template docAbstraction() {          comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];          comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];          comp_obj_block.text                                     = an_object["substantive"]; -        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -        comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +        comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;          the_document_body_section                               ~= comp_obj_block;          tag_assoc                                               = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);          pith["block_is"]                                        = eN.blk_is.poem; @@ -3810,10 +3810,10 @@ template docAbstraction() {              heading_ptr-1,              an_object["is"]            ); -        TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +        ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct            = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -        an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -        // anchor_tag                                           = substantive_obj_misc_tuple[sObj.anchor_tag]; +        an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +        // anchor_tag                                           = substantive_obj_misc_struct.anchor_tag; // check          comp_obj_block                                          = comp_obj_block.init;          comp_obj_block.metainfo.is_of_part                      = "body";          comp_obj_block.metainfo.is_of_section                   = "body"; @@ -3829,9 +3829,9 @@ template docAbstraction() {          comp_obj_block.tags.html_segment_anchor_tag_is          = tag_in_seg["seg_lv4"];          comp_obj_block.tags.epub_segment_anchor_tag_is          = tag_in_seg["seg_lv1to4"];          comp_obj_block.text                                     = an_object["substantive"]; -        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_tuple[sObj.notes_reg]; -        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_tuple[sObj.notes_star]; -        comp_obj_block.has.inline_links                         = substantive_obj_misc_tuple[sObj.links]; +        comp_obj_block.has.inline_notes_reg                     = substantive_obj_misc_struct.has_notes_reg; +        comp_obj_block.has.inline_notes_star                    = substantive_obj_misc_struct.has_notes_star; +        comp_obj_block.has.inline_links                         = substantive_obj_misc_struct.has_links;          the_document_body_section                               ~= comp_obj_block;          pith["block_is"]                                        = eN.blk_is.block;          pith["block_state"]                                     = eN.blk_state.off; @@ -3899,10 +3899,10 @@ template docAbstraction() {              heading_ptr-1,              an_object["is"]            ); -        TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +        ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct            = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -        an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; -        anchor_tag                                              = substantive_obj_misc_tuple[sObj.anchor_tag]; +        an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt; +        anchor_tag                                              = substantive_obj_misc_struct.anchor_tag;          comp_obj_code                                           = comp_obj_code.init;          comp_obj_code.metainfo.is_of_part                       = "body";          comp_obj_code.metainfo.is_of_section                    = "body"; @@ -3919,9 +3919,9 @@ template docAbstraction() {          comp_obj_code.tags.html_segment_anchor_tag_is           = tag_in_seg["seg_lv4"];          comp_obj_code.tags.epub_segment_anchor_tag_is           = tag_in_seg["seg_lv1to4"];          comp_obj_code.text                                      = an_object["substantive"]; -        comp_obj_code.has.inline_notes_reg                      = substantive_obj_misc_tuple[sObj.notes_reg]; -        comp_obj_code.has.inline_notes_star                     = substantive_obj_misc_tuple[sObj.notes_star]; -        comp_obj_code.has.inline_links                          = substantive_obj_misc_tuple[sObj.links]; +        comp_obj_code.has.inline_notes_reg                      = substantive_obj_misc_struct.has_notes_reg; +        comp_obj_code.has.inline_notes_star                     = substantive_obj_misc_struct.has_notes_star; +        comp_obj_code.has.inline_links                          = substantive_obj_misc_struct.has_links;          the_document_body_section                               ~= comp_obj_code;          pith["block_is"]                                        = eN.blk_is.code;          pith["block_state"]                                     = eN.blk_state.off; @@ -3952,9 +3952,9 @@ template docAbstraction() {              heading_ptr-1,              an_object["is"]            ); -        TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple +        ST_txtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_struct            = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc); -        an_object["substantive"]                                = substantive_obj_misc_tuple[sObj.content]; +        an_object["substantive"]                                = substantive_obj_misc_struct.obj_txt;          comp_obj_block                                          = comp_obj_block.init;          comp_obj_block.metainfo.ocn                             = obj_cite_digits.object_number;          comp_obj_block.metainfo.identifier                      = obj_cite_digits.identifier; @@ -3980,7 +3980,7 @@ template docAbstraction() {          ++cntr;        }      } -    retStruct_flow_block_flag_line_empty ret; +    ST_flow_block_flag_line_empty ret;      {        ret.this_object                = an_object;        ret.the_document_body_section  = the_document_body_section; @@ -3992,7 +3992,7 @@ template docAbstraction() {      }      return ret;    } -  @system retStruct_flow_book_index flow_book_index_(B)( +  @system ST_flow_book_index flow_book_index_(B)(      char[]          line,      string[string]  an_object,      string          book_idx_tmp, @@ -4029,7 +4029,7 @@ template docAbstraction() {          }        }      } -    retStruct_flow_book_index ret; +    ST_flow_book_index ret;      {        ret.this_object    = an_object;        ret.pith           = pith; @@ -4037,7 +4037,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_flow_heading_found flow_heading_found_()( +  @safe ST_flow_heading_found flow_heading_found_()(      char[]                line,      string[string]        heading_match_str,      string[]              _make_unmarked_headings, @@ -4114,7 +4114,7 @@ template docAbstraction() {        }        pith["make_headings"] = eN.bi.on;      } -    retStruct_flow_heading_found ret; +    ST_flow_heading_found ret;      {        ret.heading_match_str = heading_match_str;        ret.heading_match_rgx = heading_match_rgx; @@ -4122,7 +4122,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_flow_heading_make_set flow_heading_make_set_()( +  @safe ST_flow_heading_make_set flow_heading_make_set_()(                 char[]                line,                 int[string]           line_occur,      return ref Regex!(char)[string]  heading_match_rgx, @@ -4162,7 +4162,7 @@ template docAbstraction() {          debug(headingsfound) { writeln(line); }        }      } -    retStruct_flow_heading_make_set ret; +    ST_flow_heading_make_set ret;      {        ret.line           = line;        ret.pith           = pith; @@ -4338,7 +4338,7 @@ template docAbstraction() {        an_object["dummy_heading_status"] = (pith["dummy_heading_status"] == eN.bi.off) ? "f" : "t";        debug(heading) { writeln(line.strip); }      } -    struct retStruct_flow_heading_matched { +    struct ST_flow_heading_matched {        string[string]  this_object;        int[string]     line_occur;        string          an_object_key; @@ -4347,7 +4347,7 @@ template docAbstraction() {        uint[string]    pith;        CMM             conf_make_meta;      } -    retStruct_flow_heading_matched ret; +    ST_flow_heading_matched ret;      {        ret.this_object    = an_object;        ret.line_occur     = line_occur; @@ -4359,7 +4359,7 @@ template docAbstraction() {      }      return ret;    } -  @safe retStruct_flow_para_match flow_para_match_()( +  @safe ST_flow_para_match flow_para_match_()(      char[]         line,      string[string]  an_object,      string          an_object_key, @@ -4402,7 +4402,7 @@ template docAbstraction() {        }        ++line_occur["para"];      } -    retStruct_flow_para_match ret; +    ST_flow_para_match ret;      {        ret.pith            = pith;        ret.this_object     = an_object; @@ -4460,7 +4460,7 @@ template docAbstraction() {      }      return table_object;    } -  @safe retStruct_flow_table_array_munge flow_table_array_munge()( +  @safe ST_flow_table_array_munge flow_table_array_munge()(      ObjGenericComposite  table_object,      string[][]           table_array,    ) { @@ -4566,14 +4566,14 @@ template docAbstraction() {          _table_substantive);      }      table_object.text = _table_substantive; -    retStruct_flow_table_array_munge ret; +    ST_flow_table_array_munge ret;      {        ret.table_object      = table_object;        ret.table_array       = table_array;      }      return ret;    } -  @system retStruct_flow_table_substantive_munge flow_table_substantive_munge()( +  @system ST_flow_table_substantive_munge flow_table_substantive_munge()(      ObjGenericComposite  table_object,      string               table_substantive,    ) { @@ -4593,14 +4593,14 @@ template docAbstraction() {          _table_array = _get.table_array; // what do you do with this? how is this passed down?        }      } -    retStruct_flow_table_substantive_munge ret; +    ST_flow_table_substantive_munge ret;      {        ret.table_object      = table_object;        ret.table_substantive = table_substantive; // has anything been changed here?      }      return ret;    } -  @system retStruct_flow_table_substantive_munge flow_table_substantive_munge_special()( +  @system ST_flow_table_substantive_munge flow_table_substantive_munge_special()(      ObjGenericComposite  table_object,      string               table_substantive,    ) { @@ -4620,7 +4620,7 @@ template docAbstraction() {          _table_array = _get.table_array;        }      } -    retStruct_flow_table_substantive_munge ret; +    ST_flow_table_substantive_munge ret;      {        ret.table_object      = table_object;        ret.table_substantive = table_substantive; @@ -4715,7 +4715,7 @@ template docAbstraction() {        }        return obj_txt_in;      } -    @safe TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) { +    @safe ST_txtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) {        // endnotes (regular)        bool flg_notes_reg  = false;        bool flg_notes_star = false; @@ -4778,15 +4778,16 @@ template docAbstraction() {        } else {          obj_txt_out = obj_txt_in;        } -      TxtPlusHasFootnotes t = tuple( -        obj_txt_out, -        flg_notes_reg, -        flg_notes_star, -        flg_notes_plus, -      ); -      return t; +      ST_txtPlusHasFootnotes ret; +      { +        ret.obj_txt            = obj_txt_out; +        ret.has_notes_reg      = flg_notes_reg; +        ret.has_notes_star     = flg_notes_star; +        ret.has_notes_plus     = flg_notes_plus; +      } +      return ret;      } -    @safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()( +    @safe private ST_txtPlusHasFootnotesUrlsImages object_notes_and_links_()(        string obj_txt_in,        bool reset_note_numbers = false      ) { @@ -4820,7 +4821,7 @@ template docAbstraction() {          obj_txt_in = obj_txt_in            .replaceAll(rgx.para_inline_link_anchor, "┃$1┃");        } -      TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers); +      ST_txtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);        obj_txt_out = ftn.obj_txt;        debug(footnotes) { writeln(obj_txt_out, tail); }        obj_txt_out = obj_txt_out ~ tail; @@ -4830,23 +4831,39 @@ template docAbstraction() {            writeln(m.hit);          }        } -      TxtPlusHasFootnotesUrlsImages t = tuple( -        obj_txt_out, -        ftn.has_notes_reg, -        ftn.has_notes_star, -        ftn.has_notes_plus, -        urls, -        images_without_dimensions, -      ); -      return t; +      ST_txtPlusHasFootnotesUrlsImages ret; +      { +        ret.obj_txt                       = obj_txt_out; +        ret.has_notes_reg                 = ftn.has_notes_reg; +        ret.has_notes_star                = ftn.has_notes_star; +        ret.has_notes_plus                = ftn.has_notes_plus; +        ret.has_urls                      = urls; +        ret.has_images_without_dimensions = images_without_dimensions; +      } +      return ret;      } -    auto init() { -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(""); -      return t; +    @safe private ST_txtPlusHasFootnotesUrlsImages object_only_()( +      string obj_txt_in, +      bool reset_note_numbers = false +    ) { +      ST_txtPlusHasFootnotesUrlsImages ret; +      { +        ret.obj_txt                       = obj_txt_in; +        ret.has_notes_reg                 = false; +        ret.has_notes_star                = false; +        ret.has_notes_plus                = false; +        ret.has_urls                      = false; +        ret.has_images_without_dimensions = false; +      } +      return ret; +    } +    ST_txtPlusHasFootnotesUrlsImages init() { +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(""); +      return ret;      }      invariant() {      } -    @safe auto munge_heading()( +    @safe ST_txtPlusHasFootnotesUrlsImages munge_heading()(        string obj_txt_in,        bool reset_note_numbers = false      ) { @@ -4855,72 +4872,64 @@ template docAbstraction() {         .replaceFirst(rgx.object_number_off_all, "")         .replaceFirst(rgx.markup_inline_linebreak, mkup.br_line_inline)         .strip; -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); -      debug(munge) { -        writeln(__LINE__); -        writeln(obj_txt_in); -        writeln(__LINE__); -        writeln(obj_txt["munge"].to!string); -      } -      return t; +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt["munge"], reset_note_numbers); +      debug(munge) { writeln(__LINE__); writeln(obj_txt_in); writeln(__LINE__); writeln(obj_txt["munge"].to!string); } +      return ret;      }      invariant() {      } -    @safe auto munge_para()(string obj_txt_in) { +    @safe ST_txtPlusHasFootnotesUrlsImages munge_para()(string obj_txt_in) {        obj_txt["munge"] = (obj_txt_in)          .replaceFirst(rgx.para_attribs, "")          .replaceFirst(rgx.object_number_off_all, "")          .replaceFirst(rgx.markup_inline_linebreak, mkup.br_line_inline); -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]); -      debug(munge) { -        writeln(__LINE__); -        writeln(obj_txt_in); +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt["munge"]); +      debug(munge) { writeln(__LINE__); writeln(obj_txt_in);          writeln(__LINE__);          writeln(obj_txt["munge"].to!string);        } -      return t; +      return ret;      } -    @safe auto munge_quote()(string obj_txt_in) { -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n")); -      // TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -      return t; +    @safe ST_txtPlusHasFootnotesUrlsImages munge_quote()(string obj_txt_in) { +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n")); +      return ret;      }      invariant() {      } -    @safe auto munge_group(string obj_txt_in) { -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join("\n" ~ mkup.br_line_spaced ~ "\n")); // br_line br_line_inline br_line_spaced -      return t; +    @safe ST_txtPlusHasFootnotesUrlsImages munge_group(string obj_txt_in) { +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in.split("\n\n").join("\n" ~ mkup.br_line_spaced ~ "\n")); +      return ret;      }      invariant() {      } -    @safe auto munge_block()(string obj_txt_in) { -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -      return t; +    @safe ST_txtPlusHasFootnotesUrlsImages munge_block()(string obj_txt_in) { +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +      return ret;      }      invariant() {      }      @safe auto munge_verse()(string obj_txt_in) { -      TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in); -      return t; +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +      return ret;      }      invariant() {      } -    @safe string munge_code()(string obj_txt_in) { +    @safe ST_txtPlusHasFootnotesUrlsImages munge_code()(string obj_txt_in) {        obj_txt_in = obj_txt_in.replaceAll(rgx.space, mkup.nbsp); -      obj_txt["munge"] = obj_txt_in; -      return obj_txt["munge"]; +      ST_txtPlusHasFootnotesUrlsImages ret = object_only_(obj_txt_in); +      return ret;      }      invariant() {      } -    @safe string munge_table()(string obj_txt_in) { -      obj_txt["munge"] = obj_txt_in; -      return obj_txt["munge"]; +    @safe ST_txtPlusHasFootnotesUrlsImages munge_table()(string obj_txt_in) { +      ST_txtPlusHasFootnotesUrlsImages ret = object_notes_and_links_(obj_txt_in); +      return ret;      }      invariant() {      } -    @safe string munge_comment()(string obj_txt_in) { -      obj_txt["munge"] = obj_txt_in; -      return obj_txt["munge"]; +    @safe ST_txtPlusHasFootnotesUrlsImages munge_comment()(string obj_txt_in) { +      ST_txtPlusHasFootnotesUrlsImages ret = object_only_(obj_txt_in); +      return ret;      }      invariant() {      } @@ -4930,7 +4939,7 @@ template docAbstraction() {      static auto munge = ObjInlineMarkupMunge();      string[string] obj_txt;      string anchor_tag = ""; -    @safe TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)( +    @safe ST_txtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(        string[string]   obj_,        string           obj_key_,        CMM              conf_make_meta, @@ -4944,11 +4953,14 @@ template docAbstraction() {          anchor_tag = "";        }        auto x = munge.init; -      bool[string] obj_notes_and_links; -      obj_notes_and_links["notes_reg"]                = false; -      obj_notes_and_links["notes_star"]               = false; -      obj_notes_and_links["links"]                    = false; -      obj_notes_and_links["image_no_dimensions"]      = false; +      ST_txtAndAnchorTagPlusHasFootnotesUrlsImages ret; +      ret.obj_txt                       = ""; +      ret.anchor_tag                    = ""; +      ret.has_notes_reg                 = false; +      ret.has_notes_star                = false; +      ret.has_notes_plus                = false; +      ret.has_links                     = false; +      ret.has_images_without_dimensions = false;        if ((obj_["is"] == "para")          || (obj_["is"] == "heading")          || (obj_["is"] == "quote") @@ -4989,37 +5001,30 @@ template docAbstraction() {          x                                             = munge.munge_verse(obj_txt["munge"]);          goto default;        case "code": -        obj_txt["munge"]                              = munge.munge_code(obj_txt["munge"]); -        break; +        x                                             = munge.munge_code(obj_txt["munge"]); +        goto default;        case "table": -        obj_txt["munge"]                              = munge.munge_table(obj_txt["munge"]); -        break; +        x                                             = munge.munge_table(obj_txt["munge"]); +        goto default;        case "comment": -        obj_txt["munge"]                              = munge.munge_comment(obj_txt["munge"]); -        break; +        x                                             = munge.munge_comment(obj_txt["munge"]); +        goto default;        case "doc_end_reset":          munge.initialize_note_numbers();          break;        default: -        /+ para, heading, group, block, verse +/ -        obj_txt["munge"]                              = x[0]; -        obj_notes_and_links["notes_reg"]              = x[1]; -        obj_notes_and_links["notes_star"]             = x[2]; -        obj_notes_and_links["notes_plus"]             = x[3]; -        obj_notes_and_links["links"]                  = x[4]; -        obj_notes_and_links["image_no_dimensions"]    = x[5]; +        // para, heading, group, block, verse +        ret.obj_txt                       = x.obj_txt; +        ret.anchor_tag                    = anchor_tag; +        ret.has_notes_reg                 = x.has_notes_reg; +        ret.has_notes_star                = x.has_notes_star; +        ret.has_notes_plus                = x.has_notes_plus; +        ret.has_links                     = x.has_urls; +        ret.has_images_without_dimensions = x.has_images_without_dimensions;          break;        } -      TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple( -        obj_txt["munge"], -        anchor_tag, -        obj_notes_and_links["notes_reg"], -        obj_notes_and_links["notes_star"], -        obj_notes_and_links["links"], -        obj_notes_and_links["image_no_dimensions"], -      );        anchor_tag = ""; -      return t; +      return ret;      }      invariant() {      } @@ -5030,7 +5035,7 @@ template docAbstraction() {       heading_toc_ = (m.post).replaceAll(rgx.inline_notes_curly_gen, "");       return heading_toc_;      }; -    @safe retStruct_flow_table_of_contents_gather_headings flow_table_of_contents_gather_headings(CMM)( // +    @safe ST_flow_table_of_contents_gather_headings flow_table_of_contents_gather_headings(CMM)( //        string[string]         obj_,        CMM                    conf_make_meta,        string[string]         tag_in_seg, @@ -5113,7 +5118,7 @@ template docAbstraction() {        default:          break;        } -      retStruct_flow_table_of_contents_gather_headings ret; +      ST_flow_table_of_contents_gather_headings ret;        {          ret.the_document_toc_section = the_document_toc_section;          ret.lev4_subtoc              = lev4_subtoc; @@ -5977,7 +5982,7 @@ template docAbstraction() {      }    }    struct Bibliography { -    @system public retStruct_flow_bibliography flow_bibliography_()( +    @system public ST_flow_bibliography flow_bibliography_()(        string[]    biblio_unsorted_incomplete,        JSONValue[] bib_arr_json      ) { @@ -6000,7 +6005,7 @@ template docAbstraction() {            cntr++;          }        } -      retStruct_flow_bibliography ret; +      ST_flow_bibliography ret;        {          ret.biblio_sorted  = biblio_sorted__;          ret.bib_arr_json  = bib_arr_json; | 
