aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_abstraction.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/meta_abstraction.org')
-rw-r--r--org/meta_abstraction.org234
1 files changed, 111 insertions, 123 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index 010f8b5..18bf8d6 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -82,7 +82,7 @@ template SiSUdocAbstraction() {
} // close else for not the above
} // close after non code, other blocks or regular text
<<abs_in_loop_body_01>>
- } /+ ← closed: loop markup document/text line by line +/
+ } /+ ← srcDocLoop closed: loop markup document/text line by line +/
/+ ↓ post loop markup document/text +/
<<abs_post>>
<<abs_post_doc_reloop_processing>>
@@ -587,11 +587,11 @@ line = (line).replaceAll(rgx.true_dollar, "$$$$");
/+ dollar represented as $$ needed to stop submatching on $
(substitutions using ${identifiers} must take into account (i.e. happen earlier))
+/
-debug(source) { // source lines
+debug(source) {
writeln(line);
}
debug(srclines) {
- if (!line.empty) { // source lines, not empty
+ if (!line.empty) {
writefln(
"* %s",
line
@@ -765,18 +765,18 @@ if there is a blurb section you need to:
];
bullet = false;
if (auto m = line.matchFirst(rgx.para_indent)) {
- debug(paraindent) { // para indent
+ debug(paraindent) {
writeln(line);
}
indent["hang_position"] = (m.captures[1]).to!int;
indent["base_position"] = 0;
} else if (line.matchFirst(rgx.para_bullet)) {
- debug(parabullet) { // para bullet
+ debug(parabullet) {
writeln(line);
}
bullet = true;
} else if (auto m = line.matchFirst(rgx.para_indent_hang)) {
- debug(paraindenthang) { // para indent hang
+ debug(paraindenthang) {
writeln(line);
}
indent=[
@@ -784,7 +784,7 @@ if there is a blurb section you need to:
"base_position" : (m.captures[2]).to!int,
];
} else if (auto m = line.matchFirst(rgx.para_bullet_indent)) {
- debug(parabulletindent) { // para bullet indent
+ debug(parabulletindent) {
writeln(line);
}
indent=[
@@ -1152,7 +1152,7 @@ if ((obj_type_status["heading"] == State.on)
/+ heading object (current line empty) +/
obj_cite_digits = (an_object["lev_markup_number"].to!int == 0)
? ocn_emit(OCNstatus.reset)
- : ocn_emit(OCNstatus.on); // : ocn_emit(obj_type_status["ocn_status"]);
+ : ocn_emit(OCNstatus.on);
an_object["is"] = "heading";
an_object_key="body_nugget";
auto substantive_object_and_anchor_tags_tuple
@@ -1405,8 +1405,6 @@ if (an_object["glossary_nugget"].length == 0) {
comp_obj_heading_.metainfo.parent_ocn = 1;
comp_obj_heading_.metainfo.parent_lev_markup = 0;
the_glossary_section ~= comp_obj_heading_;
-} else {
- writeln("gloss");
}
debug(glossary) {
foreach (gloss; the_glossary_section) {
@@ -1652,7 +1650,7 @@ if (the_glossary_section.length > 1) {
toc_txt_ = format(
"{ %s }#%s",
"Glossary",
- "glossary", // _anchor_tag
+ "glossary",
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
@@ -1675,7 +1673,7 @@ if (the_bibliography_section.length > 1){
toc_txt_ = format(
"{ %s }#%s",
"Bibliography",
- "bibliography", // _anchor_tag
+ "bibliography",
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
@@ -1699,7 +1697,7 @@ if (the_bookindex_section["scroll"].length > 1) {
toc_txt_ = format(
"{ %s }#%s",
"Book Index",
- "bookindex", // _anchor_tag
+ "bookindex",
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
@@ -1721,7 +1719,7 @@ if (the_blurb_section.length > 1) {
toc_txt_ = format(
"{ %s }#%s",
"Blurb",
- "blurb", // _anchor_tag
+ "blurb",
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.has.inline_links = true;
@@ -2142,7 +2140,7 @@ auto get_decendants(S)(S document_sections) {
string[] _ocn_open_key = ["","","","","","","",""];
auto _doc_sect_length = document_sections.length - 1;
int _last_ocn;
- foreach (_lg, ref obj; document_sections) { // TODO the_document_body_section
+ foreach (_lg, ref obj; document_sections) {
if (obj.metainfo.is_a == "heading") {
foreach (_dts_lv, dom_tag_status; obj.metainfo.dom_structure_markedup_tags_status) {
switch (dom_tag_status) {
@@ -2181,7 +2179,6 @@ auto get_decendants(S)(S document_sections) {
Tuple!(int, int)[] pairs;
foreach (pair; _heading_ocn_decendants.byPair) {
pairs ~= tuple(pair[0].to!int, pair[1]);
- // pairs ~= tuple(pair.key.to!int, pair.value);
}
return pairs.sort;
}
@@ -2269,8 +2266,7 @@ foreach (ref obj; the_document_head_section) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2304,8 +2300,7 @@ if (the_table_of_contents_section["scroll"].length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2371,8 +2366,7 @@ if (the_document_body_section.length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2423,8 +2417,7 @@ if (the_endnotes_section.length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2467,8 +2460,7 @@ if (the_glossary_section.length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2514,8 +2506,7 @@ if (the_bibliography_section.length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2566,8 +2557,7 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2606,8 +2596,7 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -2656,8 +2645,7 @@ if (the_blurb_section.length > 1) {
|| (opt_action.epub)
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_insert)
- || (opt_action.sqlite_update)
- || (opt_action.postgresql)) {
+ || (opt_action.sqlite_update)) {
obj = obj_dom_structure_set_markup_tags(obj, dom_structure_markedup_tags_status, obj.metainfo.heading_lev_markup);
obj = obj_dom_set_collapsed_tags(obj, dom_structure_collapsed_tags_status, obj.metainfo.heading_lev_collapsed);
}
@@ -3135,7 +3123,7 @@ void _start_block_(L,T,N)(
debug(asserts) {
static assert(is(typeof(line) == char[]));
static assert(is(typeof(obj_type_status) == int[string]));
- static assert(is(typeof(object_number_poem) == string[string]));
+ static assert(is(typeof(object_number_poem) == string[string]));
}
#+END_SRC
@@ -3646,7 +3634,7 @@ void _group_block_(L,O,T)(
obj_type_status["group"] = TriState.closing;
obj_type_status["tic_group"] = TriState.off;
} else {
- debug(group) { // group
+ debug(group) {
writeln(line);
}
an_object[an_object_key] ~= line ~= "\n"; // build group array (or string)
@@ -3727,7 +3715,7 @@ void _poem_block_(L,O,T,C,N,CMM)(
static assert(is(typeof(an_object) == string[string]));
static assert(is(typeof(obj_type_status) == int[string]));
static assert(is(typeof(cntr) == int));
- static assert(is(typeof(object_number_poem) == string[string]));
+ static assert(is(typeof(object_number_poem) == string[string]));
}
static auto rgx = Rgx();
if (obj_type_status["curly_poem"] == TriState.on) {
@@ -3735,7 +3723,7 @@ void _poem_block_(L,O,T,C,N,CMM)(
if (an_object_key in an_object
|| processing.length > 0) {
an_object[an_object_key] = "";
- debug(poem) { // poem (curly) close
+ debug(poem) {
writefln(
"* [poem curly] %s",
line
@@ -3744,7 +3732,7 @@ void _poem_block_(L,O,T,C,N,CMM)(
if (processing.length > 0) {
an_object[an_object_key] = processing["verse"];
}
- debug(poem) { // poem (curly) close
+ debug(poem) {
writeln(__LINE__);
writefln(
"* %s %s",
@@ -3843,7 +3831,7 @@ void _poem_block_(L,O,T,C,N,CMM)(
} else if (obj_type_status["tic_poem"] == TriState.on) {
if (auto m = line.matchFirst(rgx.block_tic_close)) { // tic_poem_close
an_object[an_object_key]="verse";
- debug(poem) { // poem (curly) close
+ debug(poem) {
writefln(
"* [poem tic] %s",
line
@@ -4413,7 +4401,7 @@ auto _book_index_(L,I,O,T,B)(
static auto rgx = Rgx();
if (auto m = line.match(rgx.book_index)) {
/+ match book_index +/
- debug(bookindexmatch) { // book index
+ debug(bookindexmatch) {
writefln(
"* [bookindex] %s\n",
m.captures[1].to!string,
@@ -4425,7 +4413,7 @@ auto _book_index_(L,I,O,T,B)(
obj_type_status["book_index"] = State.on;
if (opt_action.backmatter && opt_action.section_bookindex) {
book_idx_tmp = m.captures[1].to!string;
- debug(bookindexmatch) { // book index
+ debug(bookindexmatch) {
writefln(
"* [bookindex] %s\n",
book_idx_tmp,
@@ -4439,7 +4427,7 @@ auto _book_index_(L,I,O,T,B)(
if (opt_action.backmatter
&& opt_action.section_bookindex) {
an_object["bookindex_nugget"] = book_idx_tmp ~ m.captures[1].to!string;
- debug(bookindexmatch) { // book index
+ debug(bookindexmatch) {
writefln(
"* [bookindex] %s\n",
book_idx_tmp,
@@ -4470,11 +4458,11 @@ auto _heading_found_(L,X,H,R,T)(
return ref T obj_type_status
) {
debug(asserts) {
- static assert(is(typeof(line) == char[]));
- static assert(is(typeof(_make_unmarked_headings) == string[]));
- static assert(is(typeof(heading_match_str) == string[string]));
- static assert(is(typeof(heading_match_rgx) == Regex!(char)[string]));
- static assert(is(typeof(obj_type_status) == int[string]));
+ static assert(is(typeof(line) == char[]));
+ static assert(is(typeof(_make_unmarked_headings) == string[]));
+ static assert(is(typeof(heading_match_str) == string[string]));
+ static assert(is(typeof(heading_match_rgx) == Regex!(char)[string]));
+ static assert(is(typeof(obj_type_status) == int[string]));
}
static auto rgx = Rgx();
if ((_make_unmarked_headings.length > 2)
@@ -4774,7 +4762,7 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)(
default:
an_object["lev_markup_number"] = lv["lv"].to!string;
}
- debug(heading) { // heading
+ debug(heading) {
writeln(line.strip);
}
}
@@ -4801,32 +4789,32 @@ void _para_match_(L,O,K,I,B,T,C)(
static assert(is(typeof(indent) == int[string]));
static assert(is(typeof(bullet) == bool));
static assert(is(typeof(obj_type_status) == int[string]));
- static assert(is(typeof(line_occur) == int[string]));
+ static assert(is(typeof(line_occur) == int[string]));
}
static auto rgx = Rgx();
if (line_occur["para"] == State.off) {
line = font_faces_line(line);
/+ para matches +/
obj_type_status["para"] = State.on;
- an_object[an_object_key] ~= line; // body_nugget
+ an_object[an_object_key] ~= line;
indent=[
"hang_position" : 0,
"base_position" : 0,
];
bullet = false;
if (auto m = line.matchFirst(rgx.para_indent)) {
- debug(paraindent) { // para indent
+ debug(paraindent) {
writeln(line);
}
indent["hang_position"] = (m.captures[1]).to!int;
indent["base_position"] = 0;
} else if (line.matchFirst(rgx.para_bullet)) {
- debug(parabullet) { // para bullet
+ debug(parabullet) {
writeln(line);
}
bullet = true;
} else if (auto m = line.matchFirst(rgx.para_indent_hang)) {
- debug(paraindenthang) { // para indent hang
+ debug(paraindenthang) {
writeln(line);
}
indent=[
@@ -4834,7 +4822,7 @@ void _para_match_(L,O,K,I,B,T,C)(
"base_position" : (m.captures[2]).to!int,
];
} else if (auto m = line.matchFirst(rgx.para_bullet_indent)) {
- debug(parabulletindent) { // para bullet indent
+ debug(parabulletindent) {
writeln(line);
}
indent=[
@@ -5833,16 +5821,16 @@ static struct ObjInlineMarkup {
comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.metainfo.is_of_part = "frontmatter";
- comp_obj_toc.metainfo.is_of_section = "toc";
- comp_obj_toc.metainfo.is_of_type = "para";
- comp_obj_toc.metainfo.is_a = "toc";
- comp_obj_toc.metainfo.ocn = 0;
- comp_obj_toc.metainfo.object_number_off = "";
- comp_obj_toc.metainfo.object_number_type = 0;
- comp_obj_toc.attrib.bullet = false;
- comp_obj_toc.has.inline_links = true;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ comp_obj_toc.metainfo.object_number_off = "";
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
case 0:
indent=[
@@ -5851,11 +5839,11 @@ static struct ObjInlineMarkup {
];
toc_txt_ = "{ Table of Contents }" ~ mkup.mark_internal_site_lnk ~ "toc.fnSuffix";
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["seg"] ~= comp_obj_toc;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 1: .. case 3:
indent=[
@@ -5867,11 +5855,11 @@ static struct ObjInlineMarkup {
heading_toc_,
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["seg"] ~= comp_obj_toc;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 4:
toc_txt_ = format(
@@ -5887,11 +5875,11 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["seg"] ~= comp_obj_toc;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 5: .. case 7:
toc_txt_ = format(
@@ -5916,11 +5904,11 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section["seg"] ~= comp_obj_toc;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
default:
break;
@@ -6464,15 +6452,15 @@ struct ObjAttributes {
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["object_number"] = _comp_obj_heading.metainfo.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.metainfo.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.metainfo.heading_lev_collapsed;
+ oa_j.object["object_number"] = _comp_obj_heading.metainfo.ocn;
+ oa_j.object["lev_markup_number"] = _comp_obj_heading.metainfo.heading_lev_markup;
+ oa_j.object["lev_collapsed_number"] = _comp_obj_heading.metainfo.heading_lev_collapsed;
oa_j.object["heading_ptr"]
= _comp_obj_heading.ptr.heading;
oa_j.object["doc_object_ptr"]
= _comp_obj_heading.ptr.doc_object;
}
- oa_j.object["parent_object_number"] = _comp_obj_heading.metainfo.parent_ocn;
+ oa_j.object["parent_object_number"] = _comp_obj_heading.metainfo.parent_ocn;
oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
_obj_attrib = oa_j.toString();
return _obj_attrib;
@@ -6505,7 +6493,7 @@ struct BookIndexNuggetHash {
)
in {
debug(asserts) {
- static assert(is(typeof(bookindex_section) == string));
+ static assert(is(typeof(bookindex_section) == string));
static assert(is(typeof(obj_cite_digits.on) == int));
}
debug(bookindexraw) {
@@ -6778,25 +6766,25 @@ struct BookIndexReportSection {
bi_tmp_seg ~= " \\\\\n ";
++skn;
}
- bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
- bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.metainfo.is_of_part = "backmatter";
- comp_obj_para.metainfo.is_of_section = "bookindex";
- comp_obj_para.metainfo.is_of_type = "para";
- comp_obj_para.metainfo.is_a = "bookindex";
- comp_obj_para.text = bi_tmp_scroll.to!string.strip;
- comp_obj_para.metainfo.ocn = 0;
- comp_obj_para.metainfo.object_number_off = "";
- comp_obj_para.metainfo.object_number_type = 0;
- comp_obj_para.tags.anchor_tags = bi_tmp_tags;
- comp_obj_para.attrib.indent_hang = 0;
- comp_obj_para.attrib.indent_base = 1;
- comp_obj_para.attrib.bullet = false;
- comp_obj_para.has.inline_links = true;
- bookindex_section["scroll"] ~= comp_obj_para;
- comp_obj_para.text = bi_tmp_seg.to!string.strip;
- bookindex_section["seg"] ~= comp_obj_para;
+ bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
+ bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "bookindex";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "bookindex";
+ comp_obj_para.text = bi_tmp_scroll.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.object_number_off = "";
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.tags.anchor_tags = bi_tmp_tags;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = false;
+ comp_obj_para.has.inline_links = true;
+ bookindex_section["scroll"] ~= comp_obj_para;
+ comp_obj_para.text = bi_tmp_seg.to!string.strip;
+ bookindex_section["seg"] ~= comp_obj_para;
++mkn;
}
} else { // no book index, (figure out what to do here)
@@ -6846,11 +6834,11 @@ struct NotesSection {
)
in {
assert((contents_am[cntr].metainfo.is_a == "para")
- || (contents_am[cntr].metainfo.is_a == "heading")
- || (contents_am[cntr].metainfo.is_a == "quote")
- || (contents_am[cntr].metainfo.is_a == "group")
- || (contents_am[cntr].metainfo.is_a == "block")
- || (contents_am[cntr].metainfo.is_a == "verse"));
+ || (contents_am[cntr].metainfo.is_a == "heading")
+ || (contents_am[cntr].metainfo.is_a == "quote")
+ || (contents_am[cntr].metainfo.is_a == "group")
+ || (contents_am[cntr].metainfo.is_a == "block")
+ || (contents_am[cntr].metainfo.is_a == "verse"));
assert(cntr >= previous_count);
assert(
(contents_am[cntr].text).match(
@@ -6876,7 +6864,7 @@ struct NotesSection {
".fnSuffix#noteref_\n ", m.captures[1], " ",
m.captures[2]); // sometimes need segment name (segmented html & epub)
}
- // TODO NEXT you need anchor for segments at this point ->
+ // you need anchor for segments at this point ->
object_notes["anchor"] ~= "note_" ~ m.captures[1] ~ "』";
object_notes["notes"] ~= (segment_anchor_tag_that_object_belongs_to.empty)
? (munge.url_links(
@@ -7195,7 +7183,7 @@ struct NodeStructureMetadata {
assert(obj_cite_digits.on.to!int >= 0);
}
body {
- assert(is_ != "heading"); // should not be necessary
+ assert(is_ != "heading"); // should not be necessary
assert(obj_cite_digits.on.to!int >= 0); // should not be necessary
if (lv7 > State.off) {
p_["lev_markup_number"] = DocStructMarkupHeading.h_text_4;
@@ -7718,7 +7706,7 @@ struct HeadingAttrib {
#+name: meta_structs_init
#+BEGIN_SRC d
-struct DocObj_MetaInfo_ { // metainfo
+struct DocObj_MetaInfo_ {
string is_of_part = ""; // frontmatter, body, backmatter
string is_of_section = ""; // toc, body, glossary, biography, book index, blurb
string is_of_type = ""; // para, block ?
@@ -7785,9 +7773,9 @@ struct DocObj_MetaInfo_ { // metainfo
int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int parent_lev_markup = 0;
int parent_ocn = 0;
- int last_decendant_ocn = 0; // DONE
+ int last_decendant_ocn = 0;
}
-struct DocObj_TxtAttrib_ { // attrib
+struct DocObj_TxtAttrib_ {
int indent_base = 0;
int indent_hang = 0;
bool bullet = false;
@@ -7799,22 +7787,22 @@ struct DocObj_Has_ { // has
bool inline_notes_star = false;
bool contains_image_without_dimensions = false;
}
-struct DocObj_Table_ { // table
+struct DocObj_Table_ {
int number_of_columns = 0;
double[] column_widths = [];
string[] column_aligns = [];
bool heading = false;
bool walls = false; // not implemented
}
-struct DocObj_CodeBlock_ { // code_block
+struct DocObj_CodeBlock_ {
string syntax = "";
}
-struct DocObj_Pointer_ { // ptr
+struct DocObj_Pointer_ {
int doc_object = 0;
int html_segnames = 0;
int heading = 0;
}
-struct DocObj_Tags_ { // tags
+struct DocObj_Tags_ {
string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ]; // TODO redundant? see markedup and collapsed ancestors DONE
string segment_anchor_tag = "";
string segname_prev = "";