diff options
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 3971db1..0ef486e 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -109,8 +109,8 @@ template SiSUdocAbstraction() { /+ ↓ abstract marked up document +/ auto abstract_doc_source( char[][] markup_sourcefile_content, - string[string][string] dochead_make_json, - string[string][string] dochead_meta_json + string[string][string] dochead_make_aa, + string[string][string] dochead_meta_aa ) { /+ ↓ abstraction init +/ scope(success) { @@ -327,11 +327,11 @@ template SiSUdocAbstraction() { && ((type["para"] == State.off) && (type["heading"] == State.off))) { /+ heading or para but neither flag nor line exists +/ - if ((to!string(dochead_make_json["make"]["headings"]).length > 2) + if ((dochead_make_aa["make"]["headings"].length > 2) && (type["make_headings"] == State.off)) { /+ heading found +/ auto dochead_make_headings = - to!string(dochead_make_json["make"]["headings"]); + dochead_make_aa["make"]["headings"]; heading_found(line, dochead_make_headings, heading_match_str, heading_match_rgx, type); } if ((type["make_headings"] == State.on) @@ -344,7 +344,7 @@ template SiSUdocAbstraction() { } if (matchFirst(line, rgx.heading)) { /+ heading match +/ - heading_matched(line, line_occur, an_object, lv, collapsed_lev, type, dochead_meta_json); + heading_matched(line, line_occur, an_object, lv, collapsed_lev, type, dochead_meta_aa); } else if (line_occur["para"] == State.off) { /+ para match +/ para_match(line, an_object, indent, bullet, type, line_occur); @@ -1381,7 +1381,7 @@ template SiSUdocAbstraction() { an_object["attrib"] = obj_att.obj_attributes(an_object["is"], an_object["obj"], node); contents_the_objects ~= - set_abstract_object.contents_block( + set_abstract_object.contents_block_code( an_object["is"], an_object["substantive"], an_object["attrib"], @@ -1602,19 +1602,15 @@ template SiSUdocAbstraction() { ref Regex!(char)[string] heading_match_rgx, ref int[string] type ) { - if ((to!string(dochead_make_headings).length > 2) + if ((dochead_make_headings.length > 2) && (type["make_headings"] == State.off)) { /+ headings found +/ debug(headingsfound) { writeln(dochead_make_headings); } - auto make_headings_txt = - match( - to!string(dochead_make_headings), - rgx.within_quotes); char[][] make_headings_spl = split( - cast(char[]) make_headings_txt.captures[1], + cast(char[]) dochead_make_headings, rgx.make_heading_delimiter); debug(headingsfound) { writeln(make_headings_spl.length); @@ -1746,7 +1742,7 @@ template SiSUdocAbstraction() { ref int[string] lv, ref int[string] collapsed_lev, ref int[string] type, - ref string[string][string] dochead_meta_json + ref string[string][string] dochead_meta_aa ) { if (auto m = match(line, rgx.heading)) { /+ heading match +/ @@ -1760,8 +1756,8 @@ template SiSUdocAbstraction() { assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels switch (an_object["lev"]) { case "A": - an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_title, to!string(dochead_meta_json["title"]["main"])); - an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_author, to!string(dochead_meta_json["creator"]["author"])); + an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_title, to!string(dochead_meta_aa["title"]["main"])); + an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_author, to!string(dochead_meta_aa["creator"]["author"])); collapsed_lev["h0"] = 1; an_object["lev_collapsed_number"] = to!string(collapsed_lev["h0"]); @@ -2781,10 +2777,7 @@ template SiSUdocAbstraction() { ++obj_cite_number; ++mkn; foreach (endnote; endnotes_) { - type="para"; attrib=""; - indent["first"] = "0"; - indent["second"] = "0"; attrib=""; // endnotes ~= // set_abstract_object.contents_para( @@ -2794,15 +2787,9 @@ template SiSUdocAbstraction() { // false // ); endnotes_section ~= - set_abstract_object.contents_para( - type, + set_abstract_object.contents_endnote( endnote, - attrib, - obj_cite_number, - indent, - false ); - ++obj_cite_number; ++mkn; } auto t = tuple(endnotes_section, obj_cite_number); |