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 --- src/doc_reform/output/sqlite.d | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/doc_reform/output/sqlite.d') diff --git a/src/doc_reform/output/sqlite.d b/src/doc_reform/output/sqlite.d index 5f4e99d..c57dde9 100644 --- a/src/doc_reform/output/sqlite.d +++ b/src/doc_reform/output/sqlite.d @@ -457,6 +457,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); + assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "para"); + assert(obj.metainfo.is_a == "heading"); string _txt = munge_html(doc_matters, obj); _txt = inline_markup(doc_matters, obj, _txt); string o = format(q"┋

@@ -471,6 +475,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); + assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "para"); + assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); string _txt = munge_html(doc_matters, obj); _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; _txt = inline_markup(doc_matters, obj, _txt); @@ -488,6 +496,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "quote"); string _txt = munge_html(doc_matters, obj); string o = format(q"┋

%s @@ -501,6 +513,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "group"); string _txt = munge_html(doc_matters, obj); string o = format(q"┋

%s @@ -514,6 +530,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "block"); string _txt = munge_html(doc_matters, obj); string o = format(q"┋

%s

┋", @@ -526,6 +546,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "verse"); string _txt = munge_html(doc_matters, obj); string o = format(q"┋

%s

┋", obj.metainfo.is_a, @@ -536,6 +560,10 @@ template SQLiteFormatAndLoadObject() { auto html_code(O)( auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "code"); string _txt = html_special_characters_code(obj.text); string o = format(q"┋

%s

┋", obj.metainfo.is_a, @@ -547,6 +575,10 @@ template SQLiteFormatAndLoadObject() { M doc_matters, auto ref const O obj, ) { + assert(obj.metainfo.is_of_part == "body"); + assert(obj.metainfo.is_of_section == "body"); + assert(obj.metainfo.is_of_type == "block"); + assert(obj.metainfo.is_a == "table"); auto _tablarize(O)( auto ref const O obj, string _txt, -- cgit v1.2.3