From 9cf470e69b2d579701ee607f796de612dc600565 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 20 Apr 2017 13:57:03 -0400 Subject: 0.14.0 reorganized files, and paths --- org/ao_doc_abstraction.org | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'org/ao_doc_abstraction.org') diff --git a/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org index e178575..93768c1 100644 --- a/org/ao_doc_abstraction.org +++ b/org/ao_doc_abstraction.org @@ -185,7 +185,6 @@ template SiSUdocAbstraction() { <> <> <> - // <> <> <> <> @@ -625,8 +624,9 @@ scope(failure) { ); } line = (line).replaceAll(rgx.true_dollar, "$$$$"); - // dollar represented as $$ needed to stop submatching on $ - // (substitutions using ${identifiers} must take into account (i.e. happen earlier)) + /+ dollar represented as $$ needed to stop submatching on $ + (substitutions using ${identifiers} must take into account (i.e. happen earlier)) + +/ debug(source) { // source lines writeln(line); } @@ -705,7 +705,6 @@ if there is a glossary section you need to: writeln(__LINE__); writeln(line); } - // _glossary_block_(line, type); type["glossary_section"] = State.on; type["biblio_section"] = State.off; type["blurb_section"] = State.off; @@ -967,7 +966,6 @@ assert( "code block status: none or closed" ); if (type["blocks"] == TriState.closing) { - // blocks closed, unless followed by book index debug(check) { // block writeln(__LINE__); writeln(line); @@ -1041,14 +1039,13 @@ if (line.matchFirst(rgx.book_index) && ((type["para"] == State.off) && (type["heading"] == State.off))) { /+ heading make set +/ - _heading_make_set_(line, line_occur, heading_match_rgx, type); + line = _heading_make_set_(line, line_occur, heading_match_rgx, type); } /+ TODO node info: all headings identified at this point, - extract node info here?? - how long can it wait? - should be incorporated in composite objects - should happen before endnote links set (they need to be moved down?) - // node_construct.node_emitter_heading segment anchor tag +/ if (line.matchFirst(rgx.heading)) { /+ heading match +/ @@ -1191,7 +1188,6 @@ if ((type["heading"] == State.on) writeln(segment_anchor_tag_that_object_belongs_to); } the_document_body_section ~= comp_obj_heading; - // track previous heading and make assertions debug(objectrelated1) { // check writeln(line); } @@ -1256,7 +1252,6 @@ if ((type["heading"] == State.on) line == null, "line variable should be empty, should not occur" ); - // check what happens when paragraph separated by 2 newlines } #+END_SRC @@ -1401,7 +1396,6 @@ if (biblio_ordered.length > 0) { comp_obj_heading_.parent_ocn = 1; comp_obj_heading_.parent_lev_markup = 0; the_bibliography_section ~= comp_obj_heading_; - // --- comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "backmatter"; comp_obj_heading_.is_of = "para"; @@ -2008,7 +2002,6 @@ if (the_bookindex_section["scroll"].length > 1) { foreach (ref obj; the_bookindex_section["scroll"]) { if (obj.is_a == "heading") { debug(dom) { - // writeln(obj.text); } if (obj.heading_lev_markup == 4) { obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1]; @@ -2094,7 +2087,6 @@ if (the_blurb_section.length > 1) { comp_obj_heading_.use = "empty"; comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; - // comp_obj_heading_.text = "(skip) this is the DOM tail"; comp_obj_heading_.ocn = 0; comp_obj_para.obj_cite_number = ""; comp_obj_heading_.segment_anchor_tag = ""; @@ -2530,6 +2522,9 @@ void _code_block_(L,O,T)( debug(code) { // code (curly) close writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["curly_code"] = TriState.off; @@ -2544,6 +2539,9 @@ void _code_block_(L,O,T)( debug(code) { // code (tic) close writeln(line); } + an_object[an_object_key] = an_object[an_object_key] + .replaceFirst(rgx.newline_eol_delimiter_only, "") + .stripRight; type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["tic_code"] = TriState.off; @@ -2794,6 +2792,7 @@ void _quote_block_(L,O,T)( debug(quote) { // quote (curly) close writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["curly_quote"] = TriState.off; @@ -2808,6 +2807,7 @@ void _quote_block_(L,O,T)( debug(quote) { // quote (tic) close writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["tic_quote"] = TriState.off; @@ -2844,6 +2844,7 @@ void _group_block_(L,O,T)( debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["curly_group"] = TriState.off; @@ -2858,6 +2859,7 @@ void _group_block_(L,O,T)( debug(group) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["tic_group"] = TriState.off; @@ -2895,6 +2897,7 @@ void _block_block_(L,O,T)( debug(block) { // block (curly) close writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["curly_block"] = TriState.off; @@ -2909,6 +2912,7 @@ void _block_block_(L,O,T)( debug(block) { writeln(line); } + an_object[an_object_key] = an_object[an_object_key].stripRight; type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["tic_block"] = TriState.off; @@ -3007,6 +3011,7 @@ void _poem_block_(L,O,T,C,N,Ma)( ocn_emit(type["ocn_status"]); type["verse_new"] = State.off; } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; verse_line = TriState.off; type["verse_new"] = State.on; } @@ -3099,6 +3104,7 @@ void _poem_block_(L,O,T,C,N,Ma)( ocn_emit(type["ocn_status"]); type["verse_new"] = State.off; } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { + processing["verse"] = processing["verse"].stripRight; type["verse_new"] = State.on; verse_line = TriState.off; } @@ -3298,7 +3304,6 @@ void _block_flag_line_empty_(B)( string[string] obj_cite_number_poem, string[string][string] dochead_make_aa, ) { - // line.empty, post contents, empty variables --------------- assert( line.empty, "line should be empty" @@ -3812,6 +3817,7 @@ auto _heading_make_set_(L,C,R,T)( } } } + return line; } #+END_SRC @@ -4792,7 +4798,6 @@ struct ObjInlineMarkup { switch (obj_["is"]) { case "heading": static __gshared string anchor_tag = ""; - // TODO WORK ON, you still need to ensure that level 1 anchor_tags are unique obj_txt["munge"]=_configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, dochead_make_aa); obj_txt["munge"]=_make_segment_anchor_tags_if_none_provided(obj_txt["munge"], obj_["lev"]); if (auto m = obj_txt["munge"].match(rgx.heading_anchor_tag)) { @@ -6215,9 +6220,10 @@ struct Bibliography { static assert(is(typeof(bib_arr_json) == JSONValue[])); } foreach (bibent; biblio_unordered) { - // update bib to include deemed_author, needed for: - // sort_bibliography_array_by_deemed_author_year_title - // either: sort on multiple fields, or; create such sort field + /+ update bib to include deemed_author, needed for: + sort_bibliography_array_by_deemed_author_year_title + either: sort on multiple fields, or; create such sort field + +/ JSONValue j = parseJSON(bibent); if (!empty(j["fulltitle"].str)) { if (!empty(j["author_raw"].str)) { -- cgit v1.2.3