From 98c1c70e2f7a8d74d0f75f6e1ed6d0e0b3df1b09 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 2 Jan 2024 23:59:56 -0500 Subject: org, ocda (ongoing) --- org/ocda.org | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'org') diff --git a/org/ocda.org b/org/ocda.org index 4f8322c..2cd51a3 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -233,39 +233,27 @@ enum DomTags { none, open, close, close_and_open, open_still, } switch (obj.metainfo.heading_lev_markup) { case 0: lv_ancestors_txt[0] = obj.text.to!string; - foreach(k; 1..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 1..8) { lv_ancestors_txt[k] = ""; } goto default; case 1: lv_ancestors_txt[1] = obj.text.to!string; - foreach(k; 2..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 2..8) { lv_ancestors_txt[k] = ""; } goto default; case 2: lv_ancestors_txt[2] = obj.text.to!string; - foreach(k; 3..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 3..8) { lv_ancestors_txt[k] = ""; } goto default; case 3: lv_ancestors_txt[3] = obj.text.to!string; - foreach(k; 4..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 4..8) { lv_ancestors_txt[k] = ""; } goto default; case 4: lv_ancestors_txt[4] = obj.text.to!string; - foreach(k; 5..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 5..8) { lv_ancestors_txt[k] = ""; } goto default; case 5: lv_ancestors_txt[5] = obj.text.to!string; - foreach(k; 6..8) { - lv_ancestors_txt[k] = ""; - } + foreach(k; 6..8) { lv_ancestors_txt[k] = ""; } goto default; case 6: lv_ancestors_txt[6] = obj.text.to!string; @@ -759,9 +747,11 @@ auto loopMarkupSrcByLine( ) { // block object: code { - auto _get = line.txt_by_line_block_code(an_object, pith); - an_object = _get.this_object; - pith = _get.pith; + ST_txt_by_line_block_generic _get = line.txt_by_line_block_code(an_object, pith); + { + an_object = _get.this_object; + pith = _get.pith; + } } continue; } else if (!matchFirst(line, rgx.skip_from_regular_parse)) { @@ -779,7 +769,7 @@ auto loopMarkupSrcByLine( pith["section"] = eN.sect.bibliography; if (opt_action.backmatter && opt_action.section_biblio) { { - auto _get = line.txt_by_line_block_biblio(pith, bib_entry, biblio_entry_str_json, biblio_arr_json); + ST_txt_by_line_block_biblio _get = line.txt_by_line_block_biblio(pith, bib_entry, biblio_entry_str_json, biblio_arr_json); { pith = _get.pith; bib_entry = _get.bib_entry; @@ -1129,10 +1119,7 @@ auto loopMarkupSrcByLine( continue; } else if (!line.empty) { // line not empty - non blocks (headings, paragraphs) & closed blocks - assert( - !line.empty, - "line tested, line not empty surely:\n \"" ~ line ~ "\"" - ); + assert(!line.empty, "line tested, line not empty surely:\n \"" ~ line ~ "\""); assert( (pith["block_state"] == eN.blk_state.off) || (pith["block_state"] == eN.blk_state.closing), -- cgit v1.2.3