From 845f6440b8d2a672769f553a45aa1406c17d4c4f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 20 Jan 2022 15:20:01 -0500 Subject: xmls, html group text output (bullets & indents) --- org/out_sqlite.org | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'org/out_sqlite.org') diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 21e1cea..ecbfbe9 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -191,6 +191,7 @@ template SQLiteFormatAndLoadObject() { <> <> <> + <> <> <> <> @@ -611,6 +612,63 @@ string html_font_face(string _txt){ #+END_SRC ****** inline markup +******* grouped text + +#+NAME: sanitize_and_munge_inline_html_grouped_text_bullets_indents +#+BEGIN_SRC d +string inline_grouped_text_bullets_indents(M,O)( + M doc_matters, + const O obj, + string _txt, + string _suffix = ".html", + string _xml_type = "seg", +) { + static auto rgx = RgxO(); + if (obj.metainfo.is_a == "group") { + _txt = (_txt) + .replaceAll(rgx.grouped_para_indent_1, + "  ") + .replaceAll(rgx.grouped_para_indent_2, + "    ") + .replaceAll(rgx.grouped_para_indent_3, + "      ") + .replaceAll(rgx.grouped_para_indent_4, + "        ") + .replaceAll(rgx.grouped_para_indent_5, + "          ") + .replaceAll(rgx.grouped_para_indent_6, + "            ") + .replaceAll(rgx.grouped_para_indent_7, + "              ") + .replaceAll(rgx.grouped_para_indent_8, + "                ") + .replaceAll(rgx.grouped_para_indent_9, + "                  ") + .replaceAll(rgx.grouped_para_indent_hang, "  ") + .replaceAll(rgx.grouped_para_bullet, "●  ") + .replaceAll(rgx.grouped_para_bullet_indent_1, + "  ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_2, + "    ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_3, + "      ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_4, + "        ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_5, + "          ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_6, + "            ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_7, + "              ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_8, + "                ●  ") + .replaceAll(rgx.grouped_para_bullet_indent_9, + "                  ●  "); + } + return _txt; +} +#+END_SRC + ******* images #+NAME: sanitize_and_munge_inline_html_images @@ -798,6 +856,9 @@ string inline_markup(M,O)( const O obj, string _txt, ) { + if (obj.metainfo.is_a == "group") { + _txt = inline_grouped_text_bullets_indents(doc_matters, obj, _txt, xml_type); + } _txt = inline_images(doc_matters, obj, _txt, xml_type); _txt = inline_links(doc_matters, obj, _txt, xml_type); _txt = inline_notes_scroll(doc_matters, obj, _txt); @@ -915,6 +976,7 @@ string html_group(M,O)( assert(obj.metainfo.is_of_type == "block"); assert(obj.metainfo.is_a == "group"); string _txt = munge_html(doc_matters, obj); + _txt = inline_markup(doc_matters, obj, _txt); string o = format(q"┃

%s

┃", @@ -938,6 +1000,7 @@ string html_block(M,O)( assert(obj.metainfo.is_of_type == "block"); assert(obj.metainfo.is_a == "block"); string _txt = munge_html(doc_matters, obj); + _txt = inline_markup(doc_matters, obj, _txt); string o = format(q"┃

%s

┃", obj.metainfo.is_a, -- cgit v1.2.3