aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/sqlite.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out/sqlite.d')
-rw-r--r--src/doc_reform/io_out/sqlite.d56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d
index 58f8dd9..c1b55de 100644
--- a/src/doc_reform/io_out/sqlite.d
+++ b/src/doc_reform/io_out/sqlite.d
@@ -294,6 +294,57 @@ template SQLiteFormatAndLoadObject() {
.replaceAll(rgx.inline_cite, "<cite>$1</cite>");
return _txt;
}
+ 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,
+ "&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_2,
+ "&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_3,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_4,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_5,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_6,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_7,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_8,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_9,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_indent_hang, "&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet, "●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_1,
+ "&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_2,
+ "&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_3,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_4,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_5,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_6,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_7,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_8,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;")
+ .replaceAll(rgx.grouped_para_bullet_indent_9,
+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;●&nbsp;&nbsp;");
+ }
+ return _txt;
+ }
string inline_images(M,O)(
M doc_matters,
const O obj,
@@ -457,6 +508,9 @@ template SQLiteFormatAndLoadObject() {
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);
@@ -527,6 +581,7 @@ template SQLiteFormatAndLoadObject() {
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"┃<p class="%s">
%s
</p>┃",
@@ -544,6 +599,7 @@ template SQLiteFormatAndLoadObject() {
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"┃
<p class="%s">%s</p>┃",
obj.metainfo.is_a,