From 54c662aed1b2b004aeffe3d250a9dbd705897bb4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 11 Feb 2019 16:34:54 -0500 Subject: metaverse single line munging tuning --- org/meta_abstraction.org | 52 ++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 30 deletions(-) (limited to 'org/meta_abstraction.org') diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index bf67dcc..98f76ec 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -659,7 +659,7 @@ line._code_block_(an_object, obj_type_status); continue; #+END_SRC -**** _non code objects_ (other blocks or regular text) [+4] :non_code: +**** _non code objects_ (non-code blocks & regular text: by line) [+4] :non_code: ***** inline fontface markup #+name: abs_in_loop_body_non_code_obj @@ -1411,7 +1411,7 @@ if ((obj_type_status["heading"] == State.on) } #+END_SRC -*** regular text objects :text:paragraph: +*** regular _text objects_ identified :text:paragraph: #+name: abs_in_loop_body_01 #+BEGIN_SRC d @@ -1430,6 +1430,7 @@ if (the_document_body_section.length > 0) { obj_type_status["glossary_section"] = State.off; obj_type_status["blurb_section"] = State.off; } + the_document_body_section[$-1].text = (the_document_body_section[$-1].text).inline_markup_faces; if (the_document_body_section[$-1].metainfo.is_a == "verse") { /+ scan for endnotes for whole poem (each verse in poem) +/ foreach (i; previous_length .. the_document_body_section.length) { @@ -1753,7 +1754,7 @@ comp_obj_toc.attrib.indent_base = indent["base_position"]; comp_obj_toc.attrib.bullet = false; if (the_endnotes_section.length > 1) { toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s" ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, "Endnotes", "endnotes", ); @@ -1764,7 +1765,7 @@ if (the_endnotes_section.length > 1) { } if (the_glossary_section.length > 1) { toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s" ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, "Glossary", "glossary", ); @@ -1775,7 +1776,7 @@ if (the_glossary_section.length > 1) { } if (the_bibliography_section.length > 1){ toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s" ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, "Bibliography", "bibliography", ); @@ -1786,7 +1787,7 @@ if (the_bibliography_section.length > 1){ } if (the_bookindex_section.length > 1) { toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s" ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, "Book Index", "bookindex", ); @@ -1797,7 +1798,7 @@ if (the_bookindex_section.length > 1) { } if (the_blurb_section.length > 1) { toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s" ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, "Blurb", "blurb", ); @@ -2427,9 +2428,6 @@ if (the_document_body_section.length > 1) { tag_assoc[(obj.metainfo.identifier)]["seg_lv1_to_4"] = obj.tags.epub_segment_anchor_tag_is; } - if (obj.metainfo.is_a != "code") { - obj.text = obj.text.inline_markup_faces; - } if (obj.metainfo.is_a == "heading") { debug(dom) { writeln(obj.text); @@ -2480,7 +2478,6 @@ if (the_endnotes_section.length > 1) { dom_structure_markedup_tags_status = dom_structure_markedup_tags_status_buffer.dup; dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status_buffer.dup; foreach (ref obj; the_endnotes_section) { - obj.text = obj.text.inline_markup_faces; if (obj.metainfo.is_a == "heading") { debug(dom) { writeln(obj.text); @@ -2680,9 +2677,6 @@ if (the_bookindex_section.length > 1) { /+ optional only one 1~ level +/ if (the_blurb_section.length > 1) { foreach (ref obj; the_blurb_section) { - if (obj.metainfo.is_a != "code") { - obj.text = obj.text.inline_markup_faces; - } if (obj.metainfo.is_a == "heading") { debug(dom) { writeln(obj.text); @@ -2959,7 +2953,7 @@ dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; #+END_SRC -*** [#A] _return document tuple_ :return:tuple: +*** _return document tuple_ [#A] :return:tuple: #+name: abs_return_tuple #+BEGIN_SRC d @@ -5413,22 +5407,20 @@ static struct ObjInlineMarkupMunge { writeln("Image: ", obj_txt_in); } if (obj_txt_in.match(rgx.smid_image_with_dimensions)) { - obj_txt_in = obj_txt_in.replaceAll( - rgx.smid_image_with_dimensions, - ("$1" - ~ mkup.img ~ "$2,w$3h$4 " - ~ "$5") // ("$1{ $2 }$2$3") - ); + obj_txt_in = obj_txt_in + .replaceAll(rgx.smid_image_with_dimensions, ("$1" ~ mkup.img ~ "$2,w$3h$4 " ~ "$5")) + .replaceAll(rgx.smid_image_delimit, ("$1" + ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c + ~ mkup.url_o ~ mkup.url_c)); debug(images) { - writeln("IMAGE with size: ", obj_txt_in); // decide on representation + writeln("IMAGE with size: ", obj_txt_in); } } else if (obj_txt_in.match(rgx.smid_image)) { - obj_txt_in = obj_txt_in.replaceAll( - rgx.smid_image, - ("$1" - ~ mkup.img ~ "$2,w0h0 " - ~ "$3") // ("$1{ $2 }$2$3") - ); + obj_txt_in = obj_txt_in + .replaceAll(rgx.smid_image, ("$1" ~ mkup.img ~ "$2,w0h0 " ~ "$3")) + .replaceAll(rgx.smid_image_delimit, ("$1" + ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c + ~ mkup.url_o ~ mkup.url_c)); debug(images) { writeln("IMAGE: ", obj_txt_in); // decide on representation } @@ -5965,7 +5957,7 @@ static struct ObjInlineMarkup { "base_position" : obj_["lev_markup_number"].to!int, ]; toc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s".strip ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, heading_toc_, _anchor_tag, ); @@ -6025,7 +6017,7 @@ static struct ObjInlineMarkup { break; case 5: .. case 7: subtoc_txt_ = format( - mkup.lnk_o ~ " %s " ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, + mkup.lnk_o ~ "%s".strip ~ mkup.lnk_c ~ mkup.url_o ~ "#%s"~ mkup.url_c, heading_toc_, _anchor_tag, ); -- cgit v1.2.3