aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-05-06 18:51:42 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2020-05-20 11:27:26 -0400
commit1dab1836fe17ecdbf750b99832c4d1f789bedcf1 (patch)
tree56d6c0420856730cd7656c67dbde4b65af6e5db8 /src/doc_reform/meta
parentdoc structure hash removed, replaced, unused (diff)
doc abstraction, code & org whitespace, cosmetic
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d1888
-rw-r--r--src/doc_reform/meta/metadoc_object_setter.d78
2 files changed, 983 insertions, 983 deletions
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index 64e4b85..bde1a5c 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -110,10 +110,10 @@ template docAbstraction() {
int bib_entry;
/+ counters +/
int cntr, previous_count, previous_length;
- bool reset_note_numbers=true;
+ bool reset_note_numbers = true;
int[string] line_occur;
- int html_segnames_ptr=0;
- int html_segnames_ptr_cntr=0;
+ int html_segnames_ptr = 0;
+ int html_segnames_ptr_cntr = 0;
int verse_line, heading_ptr;
/+ paragraph attributes +/
int[string] indent;
@@ -400,8 +400,8 @@ template docAbstraction() {
destroy(an_object);
destroy(processing);
destroy(biblio_arr_json);
- previous_length=0;
- reset_note_numbers=true;
+ previous_length = 0;
+ reset_note_numbers = true;
}
mixin spineNode;
auto node_para_int_ = node_metadata_para_int;
@@ -618,14 +618,14 @@ template docAbstraction() {
}
pith["section"] = eN.sect.glossary;
if (opt_action.backmatter && opt_action.section_glossary) {
- indent=[
+ indent = [
"hang_position" : 0,
"base_position" : 0,
];
bullet = false;
pith["txt_is"] = eN.txt_is.para;
line_occur["para"] = eN.bi.off;
- an_object_key="glossary_nugget";
+ an_object_key = "glossary_nugget";
if (line.matchFirst(rgx.heading_glossary)) {
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -712,7 +712,7 @@ template docAbstraction() {
writeln(line);
}
if (opt_action.backmatter && opt_action.section_blurb) {
- indent=[
+ indent = [
"hang_position" : 0,
"base_position" : 0,
];
@@ -732,7 +732,7 @@ template docAbstraction() {
debug(paraindenthang) {
writeln(line);
}
- indent=[
+ indent = [
"hang_position" : (m["hang"]).to!int,
"base_position" : (m["indent"]).to!int,
];
@@ -740,7 +740,7 @@ template docAbstraction() {
debug(parabulletindent) {
writeln(line);
}
- indent=[
+ indent = [
"hang_position" : (m["indent"]).to!int,
"base_position" : (m["indent"]).to!int,
];
@@ -748,7 +748,7 @@ template docAbstraction() {
}
pith["txt_is"] = eN.txt_is.para;
line_occur["para"] = eN.bi.off;
- an_object_key="blurb_nugget";
+ an_object_key = "blurb_nugget";
if (line.matchFirst(rgx.heading_blurb)) {
{
comp_obj_heading_ = comp_obj_heading_.init;
@@ -920,7 +920,7 @@ template docAbstraction() {
|| pith["section"] == eN.sect.book_index) { /+ book_index +/
an_object = line.flow_book_index_(an_object, book_idx_tmp, pith, opt_action);
} else { /+ not book_index +/
- an_object_key="body_nugget";
+ an_object_key = "body_nugget";
if (auto m = line.matchFirst(rgx.comment)) { /+ matched comment +/
debug(comment) {
writeln(line);
@@ -969,7 +969,7 @@ template docAbstraction() {
conf_make_meta,
);
} else if (line_occur["para"] == eN.bi.off) { /+ para match +/
- an_object_key="body_nugget";
+ an_object_key = "body_nugget";
line = line
._doc_header_and_make_substitutions_(conf_make_meta)
._doc_header_and_make_substitutions_fontface_(conf_make_meta);
@@ -1028,7 +1028,7 @@ template docAbstraction() {
? ocn_emit(eN.ocn.reset)
: ocn_emit(pith["ocn"]);
an_object["is"] = "heading";
- an_object_key="body_nugget";
+ an_object_key = "body_nugget";
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, ((_new_doc) ? Yes._new_doc : No._new_doc));
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content];
@@ -1173,31 +1173,31 @@ template docAbstraction() {
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.metainfo.is_of_part = "body";
- comp_obj_para.metainfo.is_of_section = "body";
- comp_obj_para.metainfo.is_of_type = "para";
- comp_obj_para.metainfo.is_a = "para";
- comp_obj_para.text = an_object["substantive"].to!string.strip;
- comp_obj_para.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_para.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_para.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off==0) ? true : false; // TODO
- comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_para.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_para.attrib.indent_hang = indent["hang_position"];
- comp_obj_para.attrib.indent_base = indent["base_position"];
- comp_obj_para.attrib.bullet = bullet;
- comp_obj_para.tags.anchor_tags = [anchor_tag];
- comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- comp_obj_para.has.image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
- the_document_body_section ~= comp_obj_para;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "body";
+ comp_obj_para.metainfo.is_of_section = "body";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "para";
+ comp_obj_para.text = an_object["substantive"].to!string.strip;
+ comp_obj_para.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_para.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_para.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off == 0) ? true : false; // TODO
+ comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_para.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_para.attrib.indent_hang = indent["hang_position"];
+ comp_obj_para.attrib.indent_base = indent["base_position"];
+ comp_obj_para.attrib.bullet = bullet;
+ comp_obj_para.tags.anchor_tags = [anchor_tag];
+ comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ comp_obj_para.has.image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions];
+ the_document_body_section ~= comp_obj_para;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
flow_common_reset_(line_occur, an_object, pith);
- indent=[
+ indent = [
"hang_position" : 0,
"base_position" : 0,
];
@@ -1242,7 +1242,7 @@ template docAbstraction() {
if ((the_document_body_section[$-1].text).match(
rgx.inline_notes_al_all_note
)) {
- previous_count=(the_document_body_section.length -1).to!int;
+ previous_count = (the_document_body_section.length -1).to!int;
note_section.gather_notes_for_endnote_section(
the_document_body_section,
tag_in_seg,
@@ -1270,22 +1270,22 @@ template docAbstraction() {
}
}
if (an_object["glossary_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Glossary section";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Glossary section";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_glossary_section ~= comp_obj_heading_;
}
debug(glossary) {
foreach (gloss; the_glossary_section) {
@@ -1365,40 +1365,40 @@ template docAbstraction() {
((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str),
((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"),
);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.metainfo.is_of_part = "backmatter";
- comp_obj_para.metainfo.is_of_section = "bibliography";
- comp_obj_para.metainfo.is_of_type = "para";
- comp_obj_para.metainfo.is_a = "bibliography";
- comp_obj_para.text = out_.to!string.strip;
- comp_obj_para.metainfo.ocn = 0;
- comp_obj_para.metainfo.identifier = "";
- comp_obj_para.metainfo.object_number_off = true;
- comp_obj_para.metainfo.object_number_type = 0;
- comp_obj_para.attrib.indent_hang = 0;
- comp_obj_para.attrib.indent_base = 1;
- comp_obj_para.attrib.bullet = bullet;
- comp_obj_para.tags.anchor_tags = [anchor_tag];
- the_bibliography_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "bibliography";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "bibliography";
+ comp_obj_para.text = out_.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.identifier = "";
+ comp_obj_para.metainfo.object_number_off = true;
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = bullet;
+ comp_obj_para.tags.anchor_tags = [anchor_tag];
+ the_bibliography_section ~= comp_obj_para;
}
}
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Bibliography";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Bibliography";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_bibliography_section ~= comp_obj_heading_;
}
debug(bibliosection) {
foreach (o; the_bibliography_section) {
@@ -1421,46 +1421,46 @@ template docAbstraction() {
}
}
if (an_object["blurb_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Blurb section";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_para.metainfo.object_number_off = true;
- comp_obj_para.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "";
- comp_obj_heading_.tags.anchor_tag_html = "";
- comp_obj_heading_.tags.in_segment_html = "";
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there is no Blurb section";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_para.metainfo.object_number_off = true;
+ comp_obj_para.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "";
+ comp_obj_heading_.tags.anchor_tag_html = "";
+ comp_obj_heading_.tags.in_segment_html = "";
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_blurb_section ~= comp_obj_heading_;
}
debug(blurb) {
foreach (blurb; the_blurb_section) {
writeln(blurb.text);
}
}
- indent=[
+ indent = [
"hang_position" : 1,
"base_position" : 1,
];
- 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.identifier = "";
- comp_obj_toc.metainfo.object_number_off = true;
- comp_obj_toc.metainfo.object_number_type = 0;
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.attrib.bullet = false;
+ 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.identifier = "";
+ comp_obj_toc.metainfo.object_number_off = true;
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
if (the_endnotes_section.length > 1) {
toc_txt_ = format("%s%s%s%s#%s%s",
mkup.lnk_o,
@@ -1471,9 +1471,9 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= comp_obj_toc;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= comp_obj_toc;
}
if (the_glossary_section.length > 1) {
toc_txt_ = format("%s%s%s%s#%s%s",
@@ -1485,9 +1485,9 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= comp_obj_toc;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= comp_obj_toc;
}
if (the_bibliography_section.length > 1){
toc_txt_ = format("%s%s%s%s#%s%s",
@@ -1499,9 +1499,9 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= comp_obj_toc;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= comp_obj_toc;
}
if (the_bookindex_section.length > 1) {
toc_txt_ = format("%s%s%s%s#%s%s",
@@ -1513,9 +1513,9 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= comp_obj_toc;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= comp_obj_toc;
}
if (the_blurb_section.length > 1) {
toc_txt_ = format("%s%s%s%s#%s%s",
@@ -1527,9 +1527,9 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc.has.inline_links = true;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- the_table_of_contents_section ~= comp_obj_toc;
+ comp_obj_toc.has.inline_links = true;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ the_table_of_contents_section ~= comp_obj_toc;
}
debug(toc) {
writefln(
@@ -1541,7 +1541,7 @@ template docAbstraction() {
}
}
the_document_head_section ~= the_document_body_section[0];
- the_document_body_section=the_document_body_section[1..$];
+ the_document_body_section = the_document_body_section[1..$];
@safe int[] _get_ancestors_markup(O)(O obj, ref int[] _ancestors_markup) {
if (obj.metainfo.is_a == "heading") {
debug(dom) {
@@ -1914,7 +1914,7 @@ template docAbstraction() {
writeln("links to stow: ", (obj.text.match(rgx.inline_link_stow_uri)));
}
int _n_matches = (obj.text.match(rgx.inline_link_stow_uri)).count.to!int;
- for(int i=0; i < _n_matches; ++i) {
+ for(int i = 0; i < _n_matches; ++i) {
if (obj.text.match(rgx.inline_link_stow_uri)) {
obj.stow.link ~= obj.text.matchFirst(rgx.inline_link_stow_uri)[2];
obj.text = obj.text.replaceFirst(
@@ -2021,19 +2021,19 @@ template docAbstraction() {
auto image_list = (_images.sort()).uniq;
/+ optional only one 1~ level +/
if (the_endnotes_section.length > 1) {
- dom_structure_markedup_tags_status_buffer = dom_structure_markedup_tags_status.dup;
- dom_structure_collapsed_tags_status_buffer = dom_structure_collapsed_tags_status.dup;
- dom_structure_markedup_tags_status = dom_structure_markedup_tags_status_buffer.dup;
- dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status_buffer.dup;
+ dom_structure_markedup_tags_status_buffer = dom_structure_markedup_tags_status.dup;
+ dom_structure_collapsed_tags_status_buffer = dom_structure_collapsed_tags_status.dup;
+ 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) {
if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
if (obj.metainfo.heading_lev_markup == 1) {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub;
@@ -2064,9 +2064,9 @@ template docAbstraction() {
writeln(obj.text);
}
if (obj.metainfo.heading_lev_markup == 1) {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub;
@@ -2101,9 +2101,9 @@ template docAbstraction() {
writeln(obj.text);
}
if (obj.metainfo.heading_lev_markup == 1) {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub;
@@ -2123,9 +2123,9 @@ template docAbstraction() {
}
obj = obj.obj_heading_ancestors(lv_ancestors_txt);
} else if (obj.metainfo.is_a == "bibliography") {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
obj = _links(obj);
}
@@ -2145,9 +2145,9 @@ template docAbstraction() {
segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub;
}
if (obj.metainfo.heading_lev_markup == 1) {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
if (obj.metainfo.heading_lev_markup <= 4) {
if (obj.metainfo.heading_lev_markup == 4) {
@@ -2166,11 +2166,11 @@ template docAbstraction() {
}
obj = obj.obj_heading_ancestors(lv_ancestors_txt);
} else if (obj.metainfo.is_a == "bookindex") {
- obj_cite_digits = ocn_emit(eN.ocn.bkidx);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
- obj.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- obj.metainfo.object_number_type = OCNtype.bkidx;
+ obj_cite_digits = ocn_emit(eN.ocn.bkidx);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ obj.metainfo.object_number_type = OCNtype.bkidx;
}
obj = _links(obj);
}
@@ -2187,9 +2187,9 @@ template docAbstraction() {
writeln(obj.text);
}
if (obj.metainfo.heading_lev_markup == 1) {
- obj_cite_digits = ocn_emit(eN.ocn.on);
- obj.metainfo.ocn = obj_cite_digits.object_number;
- obj.metainfo.identifier = obj_cite_digits.identifier;
+ obj_cite_digits = ocn_emit(eN.ocn.on);
+ obj.metainfo.ocn = obj_cite_digits.object_number;
+ obj.metainfo.identifier = obj_cite_digits.identifier;
}
if (obj.metainfo.heading_lev_markup <= 4) {
segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub;
@@ -2209,9 +2209,9 @@ template docAbstraction() {
}
obj = obj.obj_heading_ancestors(lv_ancestors_txt);
} else if (obj.metainfo.is_a == "blurb") {
- obj_cite_digits = ocn_emit(eN.ocn.off);
- obj.metainfo.object_number_off = obj_cite_digits.off;
- obj.metainfo.object_number_type = OCNtype.non;
+ obj_cite_digits = ocn_emit(eN.ocn.off);
+ obj.metainfo.object_number_off = obj_cite_digits.off;
+ obj.metainfo.object_number_type = OCNtype.non;
}
obj = _links(obj);
}
@@ -2314,27 +2314,27 @@ template docAbstraction() {
- obj.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status;
- obj.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status;
+/
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "";
- comp_obj_heading_.tags.anchor_tag_html = "";
- comp_obj_heading_.tags.in_segment_html = "";
- comp_obj_heading_.tags.html_segment_anchor_tag_is = "";
- comp_obj_heading_.tags.epub_segment_anchor_tag_is = "";
- comp_obj_heading_.metainfo.heading_lev_markup = 9;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 9;
- comp_obj_heading_.metainfo.parent_ocn = 0;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status.dup;
- comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status.dup;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "";
+ comp_obj_heading_.tags.anchor_tag_html = "";
+ comp_obj_heading_.tags.in_segment_html = "";
+ comp_obj_heading_.tags.html_segment_anchor_tag_is = "";
+ comp_obj_heading_.tags.epub_segment_anchor_tag_is = "";
+ comp_obj_heading_.metainfo.heading_lev_markup = 9;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 9;
+ comp_obj_heading_.metainfo.parent_ocn = 0;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status.dup;
+ comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status.dup;
comp_obj_heading_ = comp_obj_heading_.obj_dom_structure_set_markup_tags(dom_structure_markedup_tags_status, 0);
comp_obj_heading_ = comp_obj_heading_.obj_dom_set_collapsed_tags(dom_structure_collapsed_tags_status, 0);
comp_obj_heading_ = comp_obj_heading_.obj_heading_ancestors(lv_ancestors_txt);
@@ -2395,8 +2395,8 @@ template docAbstraction() {
document_section_keys_sequenced["scroll"] ~= "tail";
document_section_keys_sequenced["seg"] ~= "tail";
}
- string[] segnames_4 = segnames["html"].dup;
- string[] segnames_lv1_to_4 = segnames["epub"].dup;
+ string[] segnames_4 = segnames["html"].dup;
+ string[] segnames_lv1_to_4 = segnames["epub"].dup;
debug(segnames) {
writeln("segnames_lv4: ", segnames_4);
writeln("segnames_lv1_to_4: ", segnames_lv1_to_4);
@@ -2412,16 +2412,16 @@ template docAbstraction() {
destroy(segnames);
destroy(bookindex_unordered_hashes);
destroy(an_object);
- obj_cite_digits = ocn_emit(eN.ocn.reset);
- biblio_arr_json = [];
- obj_cite_digit_ = 0;
- html_segnames_ptr = 0;
- html_segnames_ptr_cntr = 0;
- content_non_header = "8";
- dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- 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,];
+ obj_cite_digits = ocn_emit(eN.ocn.reset);
+ biblio_arr_json = [];
+ obj_cite_digit_ = 0;
+ html_segnames_ptr = 0;
+ html_segnames_ptr_cntr = 0;
+ content_non_header = "8";
+ dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ 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,];
@safe auto doc_has() {
struct DocHas_ {
@@ -2494,10 +2494,10 @@ template docAbstraction() {
return ref string[string] an_object,
return ref uint[string] pith,
) {
- line_occur["heading"] = eN.bi.off;
- line_occur["para"] = eN.bi.off;
- pith["txt_is"] = eN.txt_is.off;
- an_object = an_object.object_reset;
+ line_occur["heading"] = eN.bi.off;
+ line_occur["para"] = eN.bi.off;
+ pith["txt_is"] = eN.txt_is.off;
+ an_object = an_object.object_reset;
}
@safe static uint[string] _check_ocn_status_()(
char[] line,
@@ -2524,27 +2524,27 @@ template docAbstraction() {
}
}
} else if (pith["no_ocn_multiple_objects"] == eN.bi.off) {
- pith["dummy_heading_status"] = eN.bi.off;
+ pith["dummy_heading_status"] = eN.bi.off;
if (pith["dummy_heading_multiple_objects"]) {
- pith["dummy_heading_status"] = eN.bi.on;
+ pith["dummy_heading_status"] = eN.bi.on;
}
if (line.matchFirst(rgx.object_number_off)) {
- pith["ocn"] = eN.ocn.off;
+ pith["ocn"] = eN.ocn.off;
} else if (line.matchFirst(rgx.object_number_off_dummy_heading)) {
- pith["ocn"] = eN.ocn.off;
- pith["dummy_heading_status"] = eN.bi.on;
+ pith["ocn"] = eN.ocn.off;
+ pith["dummy_heading_status"] = eN.bi.on;
} else {
- pith["ocn"] = eN.ocn.on;
- pith["dummy_heading_status"] = eN.bi.off;
+ pith["ocn"] = eN.ocn.on;
+ pith["dummy_heading_status"] = eN.bi.off;
}
} else {
pith["ocn"] = pith["no_ocn_multiple_objects"];
}
} else if (pith["no_ocn_multiple_objects"] == eN.bi.on) {
if (line.matchFirst(rgx.object_number_off_block_close)) {
- pith["no_ocn_multiple_objects"] = eN.bi.off;
- pith["ocn"] = eN.ocn.on;
- pith["dummy_heading_status"] = eN.bi.off;
+ pith["no_ocn_multiple_objects"] = eN.bi.off;
+ pith["ocn"] = eN.ocn.on;
+ pith["dummy_heading_status"] = eN.bi.off;
debug(ocnoff) {
writeln(line);
}
@@ -2602,76 +2602,76 @@ template docAbstraction() {
static auto rgx = RgxI();
if (auto m = line.matchFirst(rgx.block_curly_code_open)) {
dochas["codeblock"]++;
- an_object["lang"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
+ an_object["lang"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
debug(codecurly) { // code (curly) open
writefln(
"* [code curly] %s",
line
);
}
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
} else if (auto m = line.matchFirst(rgx.block_curly_poem_open)) {
dochas["poem"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(poem) { // poem (curly) open
writefln(
"* [poem curly] %s",
line
);
}
- object_number_poem["start"] = obj_cite_digits.object_number.to!string;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
- pith["verse_new"] = eN.bi.on;
+ object_number_poem["start"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
+ pith["verse_new"] = eN.bi.on;
} else if (auto m = line.matchFirst(rgx.block_curly_group_open)) {
dochas["group"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(group) { // group (curly) open
writefln(
"* [group curly] %s",
line
);
}
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
} else if (auto m = line.matchFirst(rgx.block_curly_block_open)) {
dochas["block"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(block) {
writefln(
"* [block curly] %s",
line
);
}
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
} else if (auto m = line.matchFirst(rgx.block_curly_quote_open)) {
dochas["quote"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = m["attrib"].to!string;
- an_object["lang"] = m["lang"].to!string;
+ an_object["syntax"] = "";
+ an_object["attrib"] = m["attrib"].to!string;
+ an_object["lang"] = m["lang"].to!string;
debug(quote) {
writefln(
"* [quote curly] %s",
line
);
}
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
} else if (auto m = line.matchFirst(rgx.block_curly_table_open)) { /+ curly table open +/
debug(table) { // table (curly) open
writefln(
@@ -2680,90 +2680,90 @@ template docAbstraction() {
);
}
dochas["table"] ++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "curly";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "curly";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
} else if (auto m = line.matchFirst(rgx.block_curly_table_special_markup)) { /+ table: special table block markup syntax! +/
dochas["table"]++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "special";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly_special;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "special";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly_special;
} else if (auto m = line.matchFirst(rgx.block_tic_code_open)) {
dochas["codeblock"]++;
- an_object["lang"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
+ an_object["lang"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
debug(codetic) {
writefln(
"* [code tic] %s",
line
);
}
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
} else if (auto m = line.matchFirst(rgx.block_tic_poem_open)) {
dochas["poem"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(poem) {
writefln(
"* [poem tic] %s",
line
);
}
- object_number_poem["start"] = obj_cite_digits.object_number.to!string;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
- pith["verse_new"] = eN.bi.on;
+ object_number_poem["start"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
+ pith["verse_new"] = eN.bi.on;
} else if (auto m = line.matchFirst(rgx.block_tic_group_open)) {
dochas["group"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(group) {
writefln(
"* [group tic] %s",
line
);
}
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
} else if (auto m = line.matchFirst(rgx.block_tic_block_open)) {
dochas["block"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
debug(block) {
writefln(
"* [block tic] %s",
line
);
}
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
} else if (auto m = line.matchFirst(rgx.block_tic_quote_open)) {
dochas["quote"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = m["attrib"].to!string;
- an_object["lang"] = m["lang"].to!string;
- debug(quote) {
+ an_object["syntax"] = "";
+ an_object["attrib"] = m["attrib"].to!string;
+ an_object["lang"] = m["lang"].to!string;
+ debug(quote) { // quote (tic) open
writefln(
"* [quote tic] %s",
line
);
}
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
} else if (auto m = line.matchFirst(rgx.block_tic_table_open)) { /+ tic table open +/
debug(table) { // table (tic) open
writefln(
@@ -2772,11 +2772,11 @@ template docAbstraction() {
);
}
dochas["table"] ++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "tic";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "tic";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
}
}
@safe string[string] flow_txt_block_quote()(
@@ -2791,10 +2791,10 @@ template docAbstraction() {
debug(quote) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(quote) {
writeln(line);
@@ -2806,10 +2806,10 @@ template docAbstraction() {
debug(quote) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(quote) {
writeln(line);
@@ -2832,10 +2832,10 @@ template docAbstraction() {
debug(group) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(group) {
writeln(line);
@@ -2847,10 +2847,10 @@ template docAbstraction() {
debug(group) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(group) {
writeln(line);
@@ -2873,10 +2873,10 @@ template docAbstraction() {
debug(block) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(block) {
writeln(line);
@@ -2888,10 +2888,10 @@ template docAbstraction() {
debug(block) {
writeln(line);
}
- an_object[an_object_key] = an_object[an_object_key].stripRight;
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object[an_object_key] = an_object[an_object_key].stripRight;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(block) {
writeln(line);
@@ -2917,7 +2917,7 @@ template docAbstraction() {
if (line.matchFirst(rgx.block_curly_poem_close)) {
if (an_object_key in an_object
|| processing.length > 0) {
- an_object[an_object_key] = "";
+ an_object[an_object_key] = "";
debug(poem) {
writefln(
"* [poem curly] %s",
@@ -2925,7 +2925,7 @@ template docAbstraction() {
);
}
if (processing.length > 0) {
- an_object[an_object_key] = processing["verse"];
+ an_object[an_object_key] = processing["verse"];
}
debug(poem) {
writeln(__LINE__);
@@ -2942,51 +2942,51 @@ template docAbstraction() {
an_object[an_object_key]
);
}
- an_object["is"] = "verse";
+ an_object["is"] = "verse";
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "verse";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
}
object_reset(an_object);
processing.remove("verse");
++cntr;
}
- object_number_poem["end"] = obj_cite_digits.object_number.to!string;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ object_number_poem["end"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
processing["verse"] ~= line ~= "\n";
if (pith["verse_new"] == eN.bi.on) {
obj_cite_digits = ocn_emit(pith["ocn"]);
- pith["verse_new"] = eN.bi.off;
+ pith["verse_new"] = eN.bi.off;
} else if (line.matchFirst(rgx.newline_eol_delimiter_only)) {
- processing["verse"] = processing["verse"].stripRight;
- verse_line = eN.bi.off;
- pith["verse_new"] = eN.bi.on;
+ processing["verse"] = processing["verse"].stripRight;
+ verse_line = eN.bi.off;
+ pith["verse_new"] = eN.bi.on;
}
if (pith["verse_new"] == eN.bi.on) {
- verse_line=1;
- an_object[an_object_key] = processing["verse"];
+ verse_line = 1;
+ an_object[an_object_key] = processing["verse"];
debug(poem) {
writefln(
"* %s curly\n%s",
@@ -2995,7 +2995,7 @@ template docAbstraction() {
);
}
processing.remove("verse");
- an_object["is"] = "verse";
+ an_object["is"] = "verse";
auto comp_obj_location = node_construct.node_location_emitter(
content_non_header,
tag_in_seg,
@@ -3008,26 +3008,26 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "verse";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3035,7 +3035,7 @@ template docAbstraction() {
}
} else if (pith["block_delim"] == eN.blk_delim.tic) {
if (auto m = line.matchFirst(rgx.block_tic_close)) {
- an_object[an_object_key]="verse";
+ an_object[an_object_key] = "verse";
debug(poem) {
writefln(
"* [poem tic] %s",
@@ -3043,7 +3043,7 @@ template docAbstraction() {
);
}
if (processing.length > 0) {
- an_object[an_object_key] = processing["verse"];
+ an_object[an_object_key] = processing["verse"];
}
if (an_object.length > 0) {
debug(poem) {
@@ -3051,50 +3051,50 @@ template docAbstraction() {
writeln(obj_cite_digits.object_number, line);
}
processing.remove("verse");
- an_object["is"] = "verse";
+ an_object["is"] = "verse";
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "verse";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
- object_number_poem["end"] = obj_cite_digits.object_number.to!string;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ object_number_poem["end"] = obj_cite_digits.object_number.to!string;
object_reset(an_object);
processing.remove("verse");
++cntr;
}
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
- processing["verse"] ~= line ~= "\n";
+ processing["verse"] ~= line ~= "\n";
if (pith["verse_new"] == eN.bi.on) {
- obj_cite_digits = ocn_emit(pith["ocn"]);
- pith["verse_new"] = eN.bi.off;
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ pith["verse_new"] = eN.bi.off;
} else if (line.matchFirst(rgx.newline_eol_delimiter_only)) {
- processing["verse"] = processing["verse"].stripRight;
- pith["verse_new"] = eN.bi.on;
- verse_line = eN.bi.off;
+ processing["verse"] = processing["verse"].stripRight;
+ pith["verse_new"] = eN.bi.on;
+ verse_line = eN.bi.off;
}
if (pith["verse_new"] == eN.bi.on) {
- verse_line=1;
- an_object[an_object_key] = processing["verse"];
+ verse_line = 1;
+ an_object[an_object_key] = processing["verse"];
debug(poem) {
writefln(
"* %s tic\n%s",
@@ -3103,7 +3103,7 @@ template docAbstraction() {
);
}
processing.remove("verse");
- an_object["is"] = "verse";
+ an_object["is"] = "verse";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3117,26 +3117,26 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "verse";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "verse";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3161,9 +3161,9 @@ template docAbstraction() {
an_object[an_object_key] = an_object[an_object_key]
.replaceFirst(rgx.newline_eol_delimiter_only, "")
.stripRight;
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(codecurly) {
writeln(line);
@@ -3178,9 +3178,9 @@ template docAbstraction() {
an_object[an_object_key] = an_object[an_object_key]
.replaceFirst(rgx.newline_eol_delimiter_only, "")
.stripRight;
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(codetic) {
writeln(line);
@@ -3203,9 +3203,9 @@ template docAbstraction() {
debug(table) {
writeln(line);
}
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(table) {
writeln(line);
@@ -3214,9 +3214,9 @@ template docAbstraction() {
}
} else if (pith["block_delim"] == eN.blk_delim.curly_special) {
if (line.empty) {
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
line.flow_table_closed_make_special_notation_table_(
an_object,
the_document_body_section,
@@ -3237,9 +3237,9 @@ template docAbstraction() {
debug(table) {
writeln(line);
}
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.closing;
- pith["block_delim"] = eN.blk_delim.off;
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.closing;
+ pith["block_delim"] = eN.blk_delim.off;
} else {
debug(table) {
writeln(line);
@@ -3252,20 +3252,20 @@ template docAbstraction() {
}
@safe final string biblio_tag_map()(string abr) {
auto btm = [
- "au" : "author_raw",
- "ed" : "editor_raw",
- "ti" : "fulltitle",
- "lng" : "language",
- "jo" : "journal",
- "vol" : "volume",
- "edn" : "edition",
- "yr" : "year",
- "pl" : "place",
- "pb" : "publisher",
- "pub" : "publisher",
- "pg" : "pages",
- "pgs" : "pages",
- "sn" : "short_name"
+ "au" : "author_raw",
+ "ed" : "editor_raw",
+ "ti" : "fulltitle",
+ "lng" : "language",
+ "jo" : "journal",
+ "vol" : "volume",
+ "edn" : "edition",
+ "yr" : "year",
+ "pl" : "place",
+ "pb" : "publisher",
+ "pub" : "publisher",
+ "pg" : "pages",
+ "pgs" : "pages",
+ "sn" : "short_name"
];
return btm[abr];
}
@@ -3319,7 +3319,7 @@ template docAbstraction() {
auto bt = line.match(rgx.biblio_tags);
bib_entry = eN.bi.off;
st = bt.captures[1].to!string;
- auto header_tag_value=(bt.captures[2]).to!string;
+ auto header_tag_value = (bt.captures[2]).to!string;
JSONValue j = parseJSON(biblio_entry_str_json);
biblio_tag_name = (st.match(rgx.biblio_abbreviations))
? (biblio_tag_map(st))
@@ -3386,7 +3386,7 @@ template docAbstraction() {
} else {
biblio_entry_str_json = "";
}
- header_tag_value="";
+ header_tag_value = "";
}
}
@system void flow_table_closed_make_special_notation_table_(N,CMM)(
@@ -3412,20 +3412,20 @@ template docAbstraction() {
heading_ptr-1,
"table"
);
- an_object["is"] = "table";
+ an_object["is"] = "table";
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
- comp_obj_block = comp_obj_block.flow_table_substantive_munge_special(an_object["substantive"]);
- the_document_body_section ~= comp_obj_block;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
+ comp_obj_block = comp_obj_block.flow_table_substantive_munge_special(an_object["substantive"]);
+ the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3465,7 +3465,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "quote";
+ an_object["is"] = "quote";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3479,31 +3479,31 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "quote";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "quote";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3517,7 +3517,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "group";
+ an_object["is"] = "group";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3531,31 +3531,31 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "group";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "group";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3569,7 +3569,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "block";
+ an_object["is"] = "block";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3583,30 +3583,30 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- // anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "block";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ // anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "block";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3619,7 +3619,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "verse";
+ an_object["is"] = "verse";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3631,21 +3631,21 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- comp_obj_poem_ocn = comp_obj_poem_ocn.init;
- comp_obj_poem_ocn.metainfo.is_of_part = "body";
- comp_obj_poem_ocn.metainfo.is_of_section = "body";
- comp_obj_poem_ocn.metainfo.is_of_type = "block";
- comp_obj_poem_ocn.metainfo.is_a = "poem";
- comp_obj_poem_ocn.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_poem_ocn.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_poem_ocn.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_poem_ocn.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_poem_ocn.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_poem_ocn.text = "";
- the_document_body_section ~= comp_obj_poem_ocn;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ comp_obj_poem_ocn = comp_obj_poem_ocn.init;
+ comp_obj_poem_ocn.metainfo.is_of_part = "body";
+ comp_obj_poem_ocn.metainfo.is_of_section = "body";
+ comp_obj_poem_ocn.metainfo.is_of_type = "block";
+ comp_obj_poem_ocn.metainfo.is_a = "poem";
+ comp_obj_poem_ocn.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_poem_ocn.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_poem_ocn.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_poem_ocn.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_poem_ocn.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_poem_ocn.text = "";
+ the_document_body_section ~= comp_obj_poem_ocn;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
} else if (pith["block_is"] == eN.blk_is.code) {
@@ -3658,7 +3658,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "code";
+ an_object["is"] = "code";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3672,31 +3672,31 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_code = comp_obj_code.init;
- comp_obj_code.metainfo.is_of_part = "body";
- comp_obj_code.metainfo.is_of_section = "body";
- comp_obj_code.metainfo.is_of_type = "block";
- comp_obj_code.metainfo.is_a = "code";
- comp_obj_code.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_code.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_code.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_code.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_code.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_code.metainfo.syntax = an_object["syntax"];
- comp_obj_code.metainfo.attrib = an_object["attrib"];
- comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
- comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_code.text = an_object["substantive"];
- comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_code;
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_code = comp_obj_code.init;
+ comp_obj_code.metainfo.is_of_part = "body";
+ comp_obj_code.metainfo.is_of_section = "body";
+ comp_obj_code.metainfo.is_of_type = "block";
+ comp_obj_code.metainfo.is_a = "code";
+ comp_obj_code.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_code.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_code.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_code.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_code.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_code.metainfo.syntax = an_object["syntax"];
+ comp_obj_code.metainfo.attrib = an_object["attrib"];
+ comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
+ comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_code.text = an_object["substantive"];
+ comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_code;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -3711,7 +3711,7 @@ template docAbstraction() {
obj_cite_digits,
tag_in_seg
);
- an_object["is"] = "table";
+ an_object["is"] = "table";
auto comp_obj_location
= node_construct.node_location_emitter(
content_non_header,
@@ -3725,21 +3725,21 @@ template docAbstraction() {
);
TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
= obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
- comp_obj_block = comp_obj_block.flow_table_substantive_munge(an_object["substantive"]);
- the_document_body_section ~= comp_obj_block;
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
+ comp_obj_block = comp_obj_block.flow_table_substantive_munge(an_object["substantive"]);
+ the_document_body_section ~= comp_obj_block;
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
object_reset(an_object);
processing.remove("verse");
++cntr;
@@ -4099,7 +4099,7 @@ template docAbstraction() {
/+ para matches +/
pith["txt_is"] = eN.txt_is.para;
an_object[an_object_key] ~= line;
- indent=[
+ indent = [
"hang_position" : 0,
"base_position" : 0,
];
@@ -4164,13 +4164,13 @@ template docAbstraction() {
H table_head,
) {
static auto rgx = RgxI();
- table_object.metainfo.is_of_part = "body";
- table_object.metainfo.is_of_section = "body";
- table_object.metainfo.is_of_type = "block";
- table_object.metainfo.is_a = "table";
- table_object.has.inline_notes_reg = false;
- table_object.has.inline_notes_star = false;
- table_object.has.inline_links = false;
+ table_object.metainfo.is_of_part = "body";
+ table_object.metainfo.is_of_section = "body";
+ table_object.metainfo.is_of_type = "block";
+ table_object.metainfo.is_a = "table";
+ table_object.has.inline_notes_reg = false;
+ table_object.has.inline_notes_star = false;
+ table_object.has.inline_links = false;
if (auto m = table_head.matchFirst(rgx.table_head_instructions)) {
table_object.table.heading
= ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
@@ -4349,42 +4349,42 @@ template docAbstraction() {
@safe auto ocn_emitter(int ocn_status_flag) {
OCNset ocn;
assert(ocn_status_flag <= eN.ocn.reset);
- ocn_object_number = ocn_bkidx = 0;
- object_identifier = "";
- ocn_is_off = false;
+ ocn_object_number = ocn_bkidx = 0;
+ object_identifier = "";
+ ocn_is_off = false;
switch(ocn_status_flag) with (eN.ocn) {
case reset:
- ocn_digit = ocn_on_ = 1;
- object_identifier = "1";
- ocn_is_off = false;
- ocn_off_ = ocn_bkidx_ = 0;
+ ocn_digit = ocn_on_ = 1;
+ object_identifier = "1";
+ ocn_is_off = false;
+ ocn_off_ = ocn_bkidx_ = 0;
break;
case on:
- ocn_digit = ocn_object_number = ++ocn_on_;
- object_identifier = ocn_digit.to!string;
- ocn_is_off = false;
+ ocn_digit = ocn_object_number = ++ocn_on_;
+ object_identifier = ocn_digit.to!string;
+ ocn_is_off = false;
break;
case off:
- ocn_digit = 0;
- ocn_off_ = ++ocn_off_;
- object_identifier = "a" ~ ocn_off_.to!string;
- ocn_is_off = true;
+ ocn_digit = 0;
+ ocn_off_ = ++ocn_off_;
+ object_identifier = "a" ~ ocn_off_.to!string;
+ ocn_is_off = true;
break;
case bkidx:
- ocn_bkidx = ++ocn_bkidx_;
+ ocn_bkidx = ++ocn_bkidx_;
break;
case closing: // unused?
break;
default:
- ocn_digit = 0;
+ ocn_digit = 0;
}
assert(ocn_digit >= 0);
- ocn.digit = ocn_digit;
- ocn.object_number = ocn_object_number; // difference between .object_number and .digit?
- ocn.identifier = object_identifier;
- ocn.off = ocn_is_off;
- ocn.bkidx = ocn_bkidx;
- ocn.type = ocn_status_flag;
+ ocn.digit = ocn_digit;
+ ocn.object_number = ocn_object_number; // difference between .object_number and .digit?
+ ocn.identifier = object_identifier;
+ ocn.off = ocn_is_off;
+ ocn.bkidx = ocn_bkidx;
+ ocn.type = ocn_status_flag;
return ocn;
}
invariant() {
@@ -4400,10 +4400,10 @@ template docAbstraction() {
static auto mkup = InlineMarkup();
int stage_reset_note_numbers = true;
private auto initialize_note_numbers() {
- n_foot = 0;
- n_foot_reg = 0;
- n_foot_sp_asterisk = 0;
- n_foot_sp_plus = 0;
+ n_foot = 0;
+ n_foot_reg = 0;
+ n_foot_sp_asterisk = 0;
+ n_foot_sp_plus = 0;
}
@safe static auto images()(string obj_txt_in) {
static auto mng = InlineMarkup();
@@ -4453,10 +4453,10 @@ template docAbstraction() {
foreach (x; obj_txt_in.split("\n")) {
if (auto m = x.matchAll(rgx.inline_text_and_note_al_)) {
if (stage_reset_note_numbers) {
- n_foot = 0;
- n_foot_reg = 0;
- n_foot_sp_asterisk = 0;
- n_foot_sp_plus = 0;
+ n_foot = 0;
+ n_foot_reg = 0;
+ n_foot_sp_asterisk = 0;
+ n_foot_sp_plus = 0;
}
stage_reset_note_numbers = false;
foreach(n; m) {
@@ -4464,7 +4464,7 @@ template docAbstraction() {
flg_notes_star = true;
++n_foot_sp_asterisk;
asterisks_ = "*";
- n_foot=n_foot_sp_asterisk;
+ n_foot = n_foot_sp_asterisk;
_tmp_txt ~= n.hit.to!string.replaceFirst(
rgx.inline_al_delimiter_open_symbol_star,
(mkup.en_a_o ~ replicate(asterisks_, n_foot_sp_asterisk) ~ " ")
@@ -4473,7 +4473,7 @@ template docAbstraction() {
flg_notes_plus = true;
++n_foot_sp_plus;
plus_ = "*";
- n_foot=n_foot_sp_plus;
+ n_foot = n_foot_sp_plus;
_tmp_txt ~= n.hit.to!string.replaceFirst(
rgx.inline_al_delimiter_open_symbol_plus,
(mkup.en_a_o ~ replicate(plus_, n_foot_sp_plus) ~ " ")
@@ -4483,7 +4483,7 @@ template docAbstraction() {
flg_notes_reg = true;
foreach (q; n.hit.to!string.matchAll(rgx.inline_al_delimiter_open_regular)) {
++n_foot_reg;
- n_foot=n_foot_reg;
+ n_foot = n_foot_reg;
_tmp_str = replaceFirst!(m => mkup.en_a_o ~ n_foot.to!string ~ " ")
(_tmp_str, rgx.inline_al_delimiter_open_regular);
}
@@ -4508,7 +4508,7 @@ template docAbstraction() {
}
@safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
string obj_txt_in,
- bool reset_note_numbers=false
+ bool reset_note_numbers = false
) {
obj_txt_out = "";
bool urls = false;
@@ -4571,7 +4571,7 @@ template docAbstraction() {
}
@safe auto munge_heading()(
string obj_txt_in,
- bool reset_note_numbers=false
+ bool reset_note_numbers = false
) {
obj_txt["munge"] = obj_txt_in
.replaceFirst(rgx.headings, "")
@@ -4589,7 +4589,7 @@ template docAbstraction() {
invariant() {
}
@safe auto munge_para()(string obj_txt_in) {
- obj_txt["munge"]=(obj_txt_in)
+ obj_txt["munge"] = (obj_txt_in)
.replaceFirst(rgx.para_attribs, "")
.replaceFirst(rgx.object_number_off_all, "");
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
@@ -4602,7 +4602,7 @@ template docAbstraction() {
return t;
}
@safe string munge_quote()(string obj_txt_in) {
- obj_txt["munge"]=obj_txt_in;
+ obj_txt["munge"] = obj_txt_in;
return obj_txt["munge"];
}
invariant() {
@@ -4633,13 +4633,13 @@ template docAbstraction() {
invariant() {
}
@safe string munge_table()(string obj_txt_in) {
- obj_txt["munge"]=obj_txt_in;
+ obj_txt["munge"] = obj_txt_in;
return obj_txt["munge"];
}
invariant() {
}
@safe string munge_comment()(string obj_txt_in) {
- obj_txt["munge"]=obj_txt_in;
+ obj_txt["munge"] = obj_txt_in;
return obj_txt["munge"];
}
invariant() {
@@ -4656,8 +4656,8 @@ template docAbstraction() {
CMM conf_make_meta,
Flag!"_new_doc" _new_doc
) {
- obj_txt["munge"] = obj_[obj_key_].dup;
- obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
+ obj_txt["munge"] = obj_[obj_key_].dup;
+ obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
? obj_txt["munge"]
: obj_txt["munge"].strip;
if (_new_doc) {
@@ -4665,69 +4665,69 @@ template docAbstraction() {
}
auto x = munge.init;
bool[string] obj_notes_and_links;
- obj_notes_and_links["notes_reg"] = false;
- obj_notes_and_links["notes_star"] = false;
- obj_notes_and_links["links"] = false;
- obj_notes_and_links["image_no_dimensions"] = false;
+ obj_notes_and_links["notes_reg"] = false;
+ obj_notes_and_links["notes_star"] = false;
+ obj_notes_and_links["links"] = false;
+ obj_notes_and_links["image_no_dimensions"] = false;
if ((obj_["is"] == "para")
|| (obj_["is"] == "heading")
|| (obj_["is"] == "quote")
|| (obj_["is"] == "group")
|| (obj_["is"] == "block")
|| (obj_["is"] == "verse")) {
- obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
- obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
+ obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
+ obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
}
switch (obj_["is"]) {
case "heading":
if (_new_doc) {
- anchor_tag = "";
+ anchor_tag = "";
}
obj_txt["munge"] = _configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, conf_make_meta, _new_doc);
obj_txt["munge"] = _make_segment_anchor_tags_if_none_provided(obj_txt["munge"], obj_["lev"], _new_doc);
if (auto m = obj_txt["munge"].match(rgx.heading_anchor_tag)) {
- anchor_tag = m.captures[1];
+ anchor_tag = m.captures[1];
} else if (obj_["lev"] == "1") {
writeln("heading anchor tag missing: ", obj_txt["munge"]);
}
- x = munge.munge_heading(obj_txt["munge"], reset_note_numbers);
- reset_note_numbers=false;
+ x = munge.munge_heading(obj_txt["munge"], reset_note_numbers);
+ reset_note_numbers = false;
goto default;
case "para":
- x = munge.munge_para(obj_txt["munge"]);
+ x = munge.munge_para(obj_txt["munge"]);
goto default;
case "group":
- x = munge.munge_group(obj_txt["munge"]);
+ x = munge.munge_group(obj_txt["munge"]);
goto default;
case "block":
- x = munge.munge_block(obj_txt["munge"]);
+ x = munge.munge_block(obj_txt["munge"]);
goto default;
case "verse":
- x = munge.munge_verse(obj_txt["munge"]);
+ x = munge.munge_verse(obj_txt["munge"]);
goto default;
case "code":
- obj_txt["munge"] = munge.munge_code(obj_txt["munge"]);
+ obj_txt["munge"] = munge.munge_code(obj_txt["munge"]);
break;
case "table":
- obj_txt["munge"] = munge.munge_table(obj_txt["munge"]);
+ obj_txt["munge"] = munge.munge_table(obj_txt["munge"]);
break;
case "quote":
- obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]);
+ obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]);
break;
case "comment":
- obj_txt["munge"] = munge.munge_comment(obj_txt["munge"]);
+ obj_txt["munge"] = munge.munge_comment(obj_txt["munge"]);
break;
case "doc_end_reset":
munge.initialize_note_numbers();
break;
default:
/+ para, heading, group, block, verse +/
- obj_txt["munge"] = x[0];
- obj_notes_and_links["notes_reg"] = x[1];
- obj_notes_and_links["notes_star"] = x[2];
- obj_notes_and_links["notes_plus"] = x[3];
- obj_notes_and_links["links"] = x[4];
- obj_notes_and_links["image_no_dimensions"] = x[5];
+ obj_txt["munge"] = x[0];
+ obj_notes_and_links["notes_reg"] = x[1];
+ obj_notes_and_links["notes_star"] = x[2];
+ obj_notes_and_links["notes_plus"] = x[3];
+ obj_notes_and_links["links"] = x[4];
+ obj_notes_and_links["image_no_dimensions"] = x[5];
break;
}
TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple(
@@ -4761,14 +4761,14 @@ template docAbstraction() {
ObjGenericComposite comp_obj_toc;
mixin InternalMarkup;
static auto mkup = InlineMarkup();
- char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[]))
+ char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[]))
.replaceAll(rgx.inline_notes_al, "");
- heading_toc_ = _clean_heading_toc_(heading_toc_);
- auto attrib="";
+ heading_toc_ = _clean_heading_toc_(heading_toc_);
+ auto attrib = "";
string toc_txt_, subtoc_txt_;
int[string] indent;
if (obj_["lev_markup_number"].to!int > 0) {
- indent=[
+ indent = [
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
@@ -4781,35 +4781,35 @@ template docAbstraction() {
mkup.url_c,
);
toc_txt_= toc_txt_.links_and_images;
- 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.identifier = "";
- comp_obj_toc.metainfo.object_number_off = true;
- comp_obj_toc.metainfo.object_number_type = 0;
- comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
- comp_obj_toc.attrib.indent_hang = indent["hang_position"];
- comp_obj_toc.attrib.indent_base = indent["base_position"];
- comp_obj_toc.attrib.bullet = false;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= 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.identifier = "";
- comp_obj_toc.metainfo.object_number_off = true;
- comp_obj_toc.metainfo.object_number_type = 0;
- comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
- 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.identifier = "";
+ comp_obj_toc.metainfo.object_number_off = true;
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= 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.identifier = "";
+ comp_obj_toc.metainfo.object_number_off = true;
+ comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
case 0: .. case 3:
break;
@@ -4849,17 +4849,17 @@ template docAbstraction() {
bool _new_doc,
) {
if (_new_doc) {
- heading_num = [ 0, 0, 0, 0 ];
- heading_number_auto_composite = "";
- auto_heading_numbering = [ true, true, true, true];
+ heading_num = [ 0, 0, 0, 0 ];
+ heading_number_auto_composite = "";
+ auto_heading_numbering = [ true, true, true, true];
}
if (conf_make_meta.make.auto_num_top_lv) {
if (obj_["lev_markup_number"].to!int == 0) {
- heading_num[0] = 0;
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
- heading_number_auto_composite = "";
+ heading_num[0] = 0;
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
+ heading_number_auto_composite = "";
}
/+ auto_num_depth minimum 0
(1.) default 2 (1.1.1) max 3 (1.1.1.1) implement +/
@@ -4867,9 +4867,9 @@ template docAbstraction() {
conf_make_meta.make.auto_num_top_lv
> obj_["lev_markup_number"].to!uint
) {
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
} else if (
conf_make_meta.make.auto_num_top_lv
== obj_["lev_markup_number"].to!uint
@@ -4879,9 +4879,9 @@ template docAbstraction() {
if (auto_heading_numbering[0]) {
heading_num[0] ++;
}
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
} else if (
conf_make_meta.make.auto_num_top_lv
== (obj_["lev_markup_number"].to!uint - 1)
@@ -4892,8 +4892,8 @@ template docAbstraction() {
&& auto_heading_numbering[1]) {
heading_num[1] ++;
}
- heading_num[2] = 0;
- heading_num[3] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
} else if (
conf_make_meta.make.auto_num_top_lv
== (obj_["lev_markup_number"].to!uint - 2)
@@ -4905,7 +4905,7 @@ template docAbstraction() {
&& auto_heading_numbering[2]) {
heading_num[2] ++;
}
- heading_num[3] = 0;
+ heading_num[3] = 0;
} else if (
conf_make_meta.make.auto_num_top_lv
== (obj_["lev_markup_number"].to!uint - 3)
@@ -5007,7 +5007,7 @@ template docAbstraction() {
rgx.heading_marker_missing_tag,
"$1~" ~ "s" ~ m.captures[1] ~ " ");
}
- } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev=="1"
+ } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev == "1"
if (_new_doc) {
heading_num_lev1 = 0;
}
@@ -5069,8 +5069,8 @@ template docAbstraction() {
_obj_attrib["json"] ~= txt_para(obj_raw);
break;
}
- _obj_attrib["json"] ~=" }";
- _obj_attrib["json"]=_set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _comp_obj_heading);
+ _obj_attrib["json"] ~= " }";
+ _obj_attrib["json"] = _set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _comp_obj_heading);
debug(structattrib) {
if (oa_j["is"].str() == "heading") {
writeln(_obj_attrib["json"]);
@@ -5192,15 +5192,15 @@ template docAbstraction() {
(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["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_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
- _obj_attrib = oa_j.toString();
+ 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_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
+ _obj_attrib = oa_j.toString();
return _obj_attrib;
}
}
@@ -5269,7 +5269,7 @@ template docAbstraction() {
if (!empty(sub_term)) {
bi_hash_nugget[main_term][sub_term] ~= object_numbers;
}
- object_numbers=null;
+ object_numbers = null;
}
}
}
@@ -5367,53 +5367,53 @@ template docAbstraction() {
string bi_tmp;
string[] bi_tmp_tags;
{
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "bookindex";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "Book Index";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = false;
- comp_obj_heading_.metainfo.object_number_off = false;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_book_index";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = "bookindex";
- comp_obj_heading_.tags.anchor_tags = ["section_bookindex"];
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = true;
- bookindex_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Book Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
+ comp_obj_heading_.metainfo.object_number_off = false;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_book_index";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = "bookindex";
+ comp_obj_heading_.tags.anchor_tags = ["section_bookindex"];
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = true;
+ bookindex_section ~= comp_obj_heading_;
tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "bookindex";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "Index";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "bookindex";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
- comp_obj_heading_.metainfo.heading_lev_markup = 4;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = false;
- comp_obj_heading_.tags.anchor_tags = ["bookindex"];
- bookindex_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "bookindex";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = false;
+ comp_obj_heading_.tags.anchor_tags = ["bookindex"];
+ bookindex_section ~= comp_obj_heading_;
tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
@@ -5455,39 +5455,39 @@ template docAbstraction() {
bi_tmp ~= " \\\\\n ";
++skn;
}
- bi_tmp = bi_tmp.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.to!string.strip;
- comp_obj_para.metainfo.ocn = 0;
- comp_obj_para.metainfo.identifier = "";
- comp_obj_para.metainfo.object_number_off = true;
- 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;
- comp_obj_para.text = bi_tmp.to!string.strip;
- bookindex_section ~= comp_obj_para;
+ bi_tmp = bi_tmp.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.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.identifier = "";
+ comp_obj_para.metainfo.object_number_off = true;
+ 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;
+ comp_obj_para.text = bi_tmp.to!string.strip;
+ bookindex_section ~= comp_obj_para;
++mkn;
}
} else { // no book index, (figure out what to do here)
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.text = "(skip) there is no Book Index";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- bookindex_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.text = "(skip) there is no Book Index";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ bookindex_section ~= comp_obj_heading_;
}
auto t = tuple(
bookindex_section,
@@ -5519,7 +5519,7 @@ template docAbstraction() {
rgx.inline_notes_al_all_note)
);
mixin InternalMarkup;
- previous_count=cntr;
+ previous_count = cntr;
static auto mkup = InlineMarkup();
static auto munge = ObjInlineMarkupMunge();
foreach(m;
@@ -5608,96 +5608,96 @@ template docAbstraction() {
if ((endnotes_["notes"].length > 0)
&& (opt_action.backmatter && opt_action.section_endnotes)) {
{
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "endnotes";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = false;
- comp_obj_heading_.metainfo.object_number_off = false;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_endnotes";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = "endnotes";
- comp_obj_heading_.tags.anchor_tags = ["section_endnotes"];
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
+ comp_obj_heading_.metainfo.object_number_off = false;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_endnotes";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = "endnotes";
+ comp_obj_heading_.tags.anchor_tags = ["section_endnotes"];
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
{
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "endnotes";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "endnotes";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
- comp_obj_heading_.metainfo.heading_lev_markup = 4;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading_.tags.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "endnotes";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["endnotes"];
+ the_endnotes_section ~= comp_obj_heading_;
tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
++mkn;
}
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- comp_obj_heading_.text = "(skip) there are no Endnotes";
- comp_obj_heading_.metainfo.ocn = 0;
- comp_obj_heading_.metainfo.identifier = "";
- comp_obj_heading_.metainfo.dummy_heading = true;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ comp_obj_heading_.text = "(skip) there are no Endnotes";
+ comp_obj_heading_.metainfo.ocn = 0;
+ comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
}
if (opt_action.backmatter && opt_action.section_endnotes) {
ObjGenericComposite comp_obj_endnote_;
- comp_obj_endnote_ = comp_obj_endnote_.init;
- comp_obj_endnote_.metainfo.is_of_part = "backmatter";
- comp_obj_endnote_.metainfo.is_of_section = "endnotes";
- comp_obj_endnote_.metainfo.is_of_type = "para";
- comp_obj_endnote_.metainfo.is_a = "endnote";
- comp_obj_endnote_.metainfo.ocn = 0;
- comp_obj_endnote_.metainfo.identifier = "";
- // comp_obj_heading_.metainfo.dummy_heading = false;
- comp_obj_heading_.metainfo.object_number_off = true;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_endnote_.attrib.indent_hang = 0;
- comp_obj_endnote_.attrib.indent_base = 0;
- comp_obj_endnote_.attrib.bullet = false;
+ comp_obj_endnote_ = comp_obj_endnote_.init;
+ comp_obj_endnote_.metainfo.is_of_part = "backmatter";
+ comp_obj_endnote_.metainfo.is_of_section = "endnotes";
+ comp_obj_endnote_.metainfo.is_of_type = "para";
+ comp_obj_endnote_.metainfo.is_a = "endnote";
+ comp_obj_endnote_.metainfo.ocn = 0;
+ comp_obj_endnote_.metainfo.identifier = "";
+ // comp_obj_heading_.metainfo.dummy_heading = false;
+ comp_obj_heading_.metainfo.object_number_off = true;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_endnote_.attrib.indent_hang = 0;
+ comp_obj_endnote_.attrib.indent_base = 0;
+ comp_obj_endnote_.attrib.bullet = false;
foreach (i, endnote; endnotes_["notes"]) {
- auto m = endnote.matchFirst(rgx.note_ref);
- string notenumber = m["ref"].to!string;
- string anchor_tag = "note_" ~ notenumber;
- comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.has.inline_links = true;
- comp_obj_endnote_.text = endnote.inline_markup_faces.strip;
- the_endnotes_section ~= comp_obj_endnote_;
+ auto m = endnote.matchFirst(rgx.note_ref);
+ string notenumber = m["ref"].to!string;
+ string anchor_tag = "note_" ~ notenumber;
+ comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
+ comp_obj_endnote_.has.inline_links = true;
+ comp_obj_endnote_.text = endnote.inline_markup_faces.strip;
+ the_endnotes_section ~= comp_obj_endnote_;
}
}
auto t = tuple(the_endnotes_section, obj_cite_digits);
@@ -5743,9 +5743,9 @@ template docAbstraction() {
JSONValue j = parseJSON(bibent);
if (!empty(j["fulltitle"].str)) {
if (!empty(j["author_raw"].str)) {
- j["deemed_author"]=j["author_arr"][0];
+ j["deemed_author"] = j["author_arr"][0];
} else if (!empty(j["editor_raw"].str)) {
- j["deemed_author"]=j["editor_arr"][0];
+ j["deemed_author"] = j["editor_arr"][0];
}
j["sortby_deemed_author_year_title"] = (
j["deemed_author"].str ~
@@ -5808,28 +5808,28 @@ template docAbstraction() {
assert(is_ != "heading"); // should not be necessary
assert(obj_cite_digits.object_number.to!int >= 0); // should not be necessary
if (lv7 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_4;
- p_["object_number"] = lv7;
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_4;
+ p_["object_number"] = lv7;
} else if (lv6 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_3;
- p_["object_number"] = lv6;
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_3;
+ p_["object_number"] = lv6;
} else if (lv5 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_2;
- p_["object_number"] = lv5;
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_2;
+ p_["object_number"] = lv5;
} else {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1;
- p_["object_number"] = lv4;
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1;
+ p_["object_number"] = lv4;
}
ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.metainfo.is_a = is_;
- comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
- comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
- comp_obj_location.metainfo.parent_ocn = p_["object_number"];
- comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
+ comp_obj_location = comp_obj_location.init;
+ comp_obj_location.metainfo.is_a = is_;
+ comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
+ comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
+ comp_obj_location.metainfo.parent_ocn = p_["object_number"];
+ comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
debug(_node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("x ", _node.to!string);
@@ -5888,14 +5888,14 @@ template docAbstraction() {
case 0:
lv = DocStructMarkupHeading.h_sect_A;
lv0 = obj_cite_digit;
- lv1=0; lv2=0; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0;
+ lv1 = 0; lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
p_["lev_markup_number"] = 0;
p_["object_number"] = 0;
break;
case 1:
lv = DocStructMarkupHeading.h_sect_B;
lv1 = obj_cite_digit;
- lv2=0; lv3=0; lv4=0; lv5=0; lv6=0; lv7=0;
+ lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
p_["lev_markup_number"]
= DocStructMarkupHeading.h_sect_A;
p_["object_number"] = lv0;
@@ -5903,15 +5903,15 @@ template docAbstraction() {
case 2:
lv = DocStructMarkupHeading.h_sect_C;
lv2 = obj_cite_digit;
- lv3=0; lv4=0; lv5=0; lv6=0; lv7=0;
+ lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
p_["lev_markup_number"]
= DocStructMarkupHeading.h_sect_B;
p_["object_number"] = lv1;
break;
case 3:
lv = DocStructMarkupHeading.h_sect_D;
- lv3=obj_cite_digit;
- lv4=0; lv5=0; lv6=0; lv7=0;
+ lv3 = obj_cite_digit;
+ lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
p_["lev_markup_number"]
= DocStructMarkupHeading.h_sect_C;
p_["object_number"] = lv2;
@@ -5919,7 +5919,7 @@ template docAbstraction() {
case 4:
lv = DocStructMarkupHeading.h_text_1;
lv4 = obj_cite_digit;
- lv5=0; lv6=0; lv7=0;
+ lv5 = 0; lv6 = 0; lv7 = 0;
if (lv3 > eN.bi.off) {
p_["lev_markup_number"]
= DocStructMarkupHeading.h_sect_D;
@@ -5941,7 +5941,7 @@ template docAbstraction() {
case 5:
lv = DocStructMarkupHeading.h_text_2;
lv5 = obj_cite_digit;
- lv6=0; lv7=0;
+ lv6 = 0; lv7 = 0;
p_["lev_markup_number"]
= DocStructMarkupHeading.h_text_1;
p_["object_number"] = lv4;
@@ -5949,7 +5949,7 @@ template docAbstraction() {
case 6:
lv = DocStructMarkupHeading.h_text_3;
lv6 = obj_cite_digit;
- lv7=0;
+ lv7 = 0;
p_["lev_markup_number"]
= DocStructMarkupHeading.h_text_2;
p_["object_number"] = lv5;
@@ -5965,35 +5965,35 @@ template docAbstraction() {
break;
}
ObjGenericComposite _comp_obj_heading_;
- _comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.metainfo.is_of_part = "body";
- _comp_obj_heading_.metainfo.is_of_section = "body";
- _comp_obj_heading_.metainfo.is_of_type = "para";
- _comp_obj_heading_.metainfo.is_a = "heading";
- _comp_obj_heading_.text = _text.to!string.strip;
- _comp_obj_heading_.metainfo.ocn = obj_cite_digits.object_number;
- _comp_obj_heading_.metainfo.identifier = obj_cite_digits.identifier;
- _comp_obj_heading_.metainfo.dummy_heading = (dummy_heading_status == "t") ? true: false;
- _comp_obj_heading_.metainfo.object_number_off = obj_cite_digits.off;
- // _comp_obj_heading_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- _comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
- _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
- _comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
- _comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
- _comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- _comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
- _comp_obj_heading_.metainfo.parent_lev_markup = p_["lev_markup_number"];
- _comp_obj_heading_.tags.heading_ancestors_text = lv_ancestors_txt;
- _comp_obj_heading_.ptr.doc_object = cntr_;
- _comp_obj_heading_.ptr.html_segnames = ((lev_markup_number == "4") ? html_segnames_ptr : 0);
- _comp_obj_heading_.ptr.heading = ptr_;
- _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
- _comp_obj_heading_.has.inline_notes_star = flag_notes_star;
- _comp_obj_heading_.has.inline_links = flag_links;
+ _comp_obj_heading_ = _comp_obj_heading_.init;
+ _comp_obj_heading_.metainfo.is_of_part = "body";
+ _comp_obj_heading_.metainfo.is_of_section = "body";
+ _comp_obj_heading_.metainfo.is_of_type = "para";
+ _comp_obj_heading_.metainfo.is_a = "heading";
+ _comp_obj_heading_.text = _text.to!string.strip;
+ _comp_obj_heading_.metainfo.ocn = obj_cite_digits.object_number;
+ _comp_obj_heading_.metainfo.identifier = obj_cite_digits.identifier;
+ _comp_obj_heading_.metainfo.dummy_heading = (dummy_heading_status == "t") ? true: false;
+ _comp_obj_heading_.metainfo.object_number_off = obj_cite_digits.off;
+ // _comp_obj_heading_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ _comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
+ _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
+ _comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
+ _comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
+ _comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
+ _comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
+ _comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
+ _comp_obj_heading_.metainfo.parent_lev_markup = p_["lev_markup_number"];
+ _comp_obj_heading_.tags.heading_ancestors_text = lv_ancestors_txt;
+ _comp_obj_heading_.ptr.doc_object = cntr_;
+ _comp_obj_heading_.ptr.html_segnames = ((lev_markup_number == "4") ? html_segnames_ptr : 0);
+ _comp_obj_heading_.ptr.heading = ptr_;
+ _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg;
+ _comp_obj_heading_.has.inline_notes_star = flag_notes_star;
+ _comp_obj_heading_.has.inline_links = flag_links;
tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
debug(_node) {
diff --git a/src/doc_reform/meta/metadoc_object_setter.d b/src/doc_reform/meta/metadoc_object_setter.d
index e916a90..9a4a5b7 100644
--- a/src/doc_reform/meta/metadoc_object_setter.d
+++ b/src/doc_reform/meta/metadoc_object_setter.d
@@ -7,54 +7,54 @@ module doc_reform.meta.metadoc_object_setter;
template ObjectSetter() {
/+ structs +/
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 ?
- string is_a = ""; // heading, para, table, code block, group, verse/poem ...
- alias of_part = is_of_part;
- alias of_section = is_of_section;
- alias is_of = is_of_type;
- string attrib = "";
- string lang = ""; // blocks: group, block, quote; not codeblock;
- string syntax = ""; // codeblock only
+ string is_of_part = ""; // frontmatter, body, backmatter
+ string is_of_section = ""; // toc, body, glossary, biography, book index, blurb
+ string is_of_type = ""; // para, block ?
+ string is_a = ""; // heading, para, table, code block, group, verse/poem ...
+ alias of_part = is_of_part;
+ alias of_section = is_of_section;
+ alias is_of = is_of_type;
+ string attrib = "";
+ string lang = ""; // blocks: group, block, quote; not codeblock;
+ string syntax = ""; // codeblock only
/+ o_n +/
- int o_n_substantive = 0;
- int o_n_non_substantive = 0;
- int o_n_glossary = 0;
- int o_n_bibliography = 0;
- int o_n_book_index = 0;
- int o_n_blurb = 0;
+ int o_n_substantive = 0;
+ int o_n_non_substantive = 0;
+ int o_n_glossary = 0;
+ int o_n_bibliography = 0;
+ int o_n_book_index = 0;
+ int o_n_blurb = 0;
@safe string object_number_substantive() const @property {
- return (o_n_substantive==0) ? "" : o_n_substantive.to!string;
+ return (o_n_substantive == 0) ? "" : o_n_substantive.to!string;
}
@safe string object_number_non_substantive() const @property {
- return (o_n_non_substantive==0) ? "" : o_n_non_substantive.to!string;
+ return (o_n_non_substantive == 0) ? "" : o_n_non_substantive.to!string;
}
@safe string object_number_glossary() const @property {
- return (o_n_glossary==0) ? "" : o_n_glossary.to!string;
+ return (o_n_glossary == 0) ? "" : o_n_glossary.to!string;
}
@safe string object_number_bibliography() const @property {
- return (o_n_bibliography==0) ? "" : o_n_bibliography.to!string;
+ return (o_n_bibliography == 0) ? "" : o_n_bibliography.to!string;
}
@safe string object_number_book_index() const @property {
- return (o_n_book_index==0) ? "" : o_n_book_index.to!string;
+ return (o_n_book_index == 0) ? "" : o_n_book_index.to!string;
}
@safe string object_number_blurb() const @property {
- return (o_n_blurb==0) ? "" : o_n_blurb.to!string;
+ return (o_n_blurb == 0) ? "" : o_n_blurb.to!string;
}
- bool object_number_off = false;
- bool visible_object_number = false;
- int object_number_type = 0; // { ocn, non, bkidx }
+ bool object_number_off = false;
+ bool visible_object_number = false;
+ int object_number_type = 0; // { ocn, non, bkidx }
/+ node +/
string[string][string] node;
- int ocn = 0;
- string identifier = "";
+ int ocn = 0;
+ string identifier = "";
@safe string object_number() const @property {
- return (ocn==0) ? "" : ocn.to!string;
+ return (ocn == 0) ? "" : ocn.to!string;
}
- int o_n_type = 0;
- int heading_lev_markup = 9;
- int heading_lev_collapsed = 9;
+ int o_n_type = 0;
+ int heading_lev_markup = 9;
+ int heading_lev_collapsed = 9;
@safe string marked_up_level() const @property {
string _out;
switch (heading_lev_markup) {
@@ -70,14 +70,14 @@ template ObjectSetter() {
}
return _out;
}
- bool dummy_heading = false;
- int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- 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;
+ bool dummy_heading = false;
+ int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ 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;
}
struct DocObj_TxtAttrib_ {
int indent_base = 0;