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) --- src/doc_reform/meta/metadoc_from_src.d | 39 ++++++++++++---------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index 46f2567..ac250a7 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -232,39 +232,27 @@ template docAbstraction() { 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; @@ -731,9 +719,11 @@ template docAbstraction() { ) { // 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)) { @@ -751,7 +741,7 @@ template docAbstraction() { 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; @@ -1101,10 +1091,7 @@ template docAbstraction() { 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