aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-21 11:38:05 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-02-11 13:08:49 -0500
commit10ec5e96d65b58dbe915c2d622b0bfb8abbd122b (patch)
treef07e7b940b754a8133ff69c29596fcbcd327aef7 /src
parentxmls, minor, internal links (metadata, images) (diff)
reduce use of auto, much with tuples
Diffstat (limited to 'src')
-rw-r--r--src/doc_reform/io_in/read_source_files.d64
-rw-r--r--src/doc_reform/io_out/defaults.d2
-rw-r--r--src/doc_reform/io_out/epub3.d6
-rw-r--r--src/doc_reform/io_out/html.d6
-rw-r--r--src/doc_reform/io_out/latex.d6
-rw-r--r--src/doc_reform/io_out/metadata.d4
-rw-r--r--src/doc_reform/io_out/odt.d2
-rw-r--r--src/doc_reform/io_out/sqlite.d6
-rw-r--r--src/doc_reform/io_out/xmls.d8
-rw-r--r--src/doc_reform/meta/conf_make_meta_structs.d2
-rw-r--r--src/doc_reform/meta/defaults.d2
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d80
-rw-r--r--src/doc_reform/meta/metadoc_harvest.d2
-rw-r--r--src/doc_reform/meta/metadoc_harvests_authors.d2
-rw-r--r--src/doc_reform/meta/metadoc_harvests_topics.d2
15 files changed, 115 insertions, 79 deletions
diff --git a/src/doc_reform/io_in/read_source_files.d b/src/doc_reform/io_in/read_source_files.d
index bf8702b..ba3e145 100644
--- a/src/doc_reform/io_in/read_source_files.d
+++ b/src/doc_reform/io_in/read_source_files.d
@@ -15,7 +15,7 @@ static template spineRawMarkupContent() {
mixin spineRgxInit;
static auto rgx = Rgx();
string[] _images=[];
- auto _extract_images(S)(S content_block) @safe {
+ string[] _extract_images(S)(S content_block) @safe {
string[] images_;
string _content_block = content_block.to!string;
if (auto m = _content_block.matchAll(rgx.image)) {
@@ -24,6 +24,17 @@ static template spineRawMarkupContent() {
return images_;
}
auto rawsrc = RawMarkupContent();
+ alias ContentsInsertsImages = Tuple!(
+ char[][], "contents",
+ string[], "insert_files",
+ string[], "images"
+ );
+ alias HeaderContentInsertsImages = Tuple!(
+ char[], "header",
+ char[][], "src_txt",
+ string[], "insert_files",
+ string[], "images"
+ );
auto spineRawMarkupContent(O,Fn)(O _opt_action, Fn fn_src) @safe {
auto _0_header_1_body_content_2_insert_filelist_tuple
= rawsrc.sourceContentSplitIntoHeaderAndBody(_opt_action, rawsrc.sourceContent(fn_src), fn_src);
@@ -32,7 +43,7 @@ static template spineRawMarkupContent() {
struct RawMarkupContent {
final sourceContent(in string fn_src) {
auto raw = MarkupRawUnit();
- auto source_txt_str
+ string source_txt_str
= raw.markupSourceReadIn(fn_src);
return source_txt_str;
}
@@ -44,22 +55,22 @@ static template spineRawMarkupContent() {
auto raw = MarkupRawUnit();
string[] insert_file_list;
string[] images_list;
- Tuple!(char[], char[][], string[], string[]) t
+ HeaderContentInsertsImages t
= raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str);
- auto header_raw = t[0];
- auto sourcefile_body_content = t[1];
+ char[] header_raw = t.header;
+ char[][] sourcefile_body_content = t.src_txt;
if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise
auto ins = Inserts();
- Tuple!(char[][], string[], string[]) tu
+ ContentsInsertsImages tu
= ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src);
- sourcefile_body_content = tu[0];
- insert_file_list = tu[1].dup;
- images_list = tu[2].dup;
+ sourcefile_body_content = tu.contents;
+ insert_file_list = tu.insert_files.dup;
+ images_list = tu.images.dup;
} else if (_opt_action.source || _opt_action.pod) {
auto ins = Inserts();
- Tuple!(char[][], string[], string[]) tu
+ ContentsInsertsImages tu
= ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src);
- images_list = tu[2].dup;
+ images_list = tu.images.dup;
}
string header_type = "";
t = tuple(
@@ -68,7 +79,6 @@ static template spineRawMarkupContent() {
insert_file_list,
images_list
);
- static assert(t.length==4);
return t;
}
}
@@ -115,24 +125,24 @@ static template spineRawMarkupContent() {
= (cast(char[]) src_text).split(rgx.newline_eol_strip_preceding);
return source_line_arr;
}
- auto markupSourceReadIn(in string fn_src) {
+ string markupSourceReadIn(in string fn_src) {
static auto rgx = Rgx();
enforce(
fn_src.match(rgx.src_pth_sst_or_ssm),
"not a dr markup filename: «" ~
fn_src ~ "»"
);
- auto source_txt_str = readInMarkupSource(fn_src);
+ string source_txt_str = readInMarkupSource(fn_src);
return source_txt_str;
}
- Tuple!(char[], char[][], string[], string[]) markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe {
+ HeaderContentInsertsImages markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe {
string[] file_insert_list = [];
string[] images_list = [];
char[][] hc = header0Content1(source_txt_str);
char[] header = hc[0];
char[] source_txt = hc[1];
char[][] source_line_arr = markupSourceLineArray(source_txt);
- Tuple!(char[], char[][], string[], string[]) t = tuple(
+ HeaderContentInsertsImages t = tuple(
header,
source_line_arr,
file_insert_list,
@@ -155,7 +165,11 @@ static template spineRawMarkupContent() {
}
}
struct Inserts {
- auto scan_subdoc_source(O)(
+ alias ContentsAndImages = Tuple!(
+ char[][], "insert_contents",
+ string[], "images"
+ );
+ ContentsAndImages scan_subdoc_source(O)(
O _opt_action,
char[][] markup_sourcefile_insert_content,
string fn_src
@@ -227,20 +241,20 @@ static template spineRawMarkupContent() {
type1["header_meta"] = 0;
contents_insert ~= line; // images to extract for image list?
if (_opt_action.source || _opt_action.pod) {
- auto _image_linelist = _extract_images(line);
+ string[] _image_linelist = _extract_images(line);
if (_image_linelist.length > 0) {
_images ~= _image_linelist;
}
}
}
} // end src subdoc (inserts) loop
- Tuple!(char[][], string[]) t = tuple(
+ ContentsAndImages t = tuple(
contents_insert,
_images
);
return t;
}
- Tuple!(char[][], string[], string[]) scan_master_src_for_insert_files_and_import_content(O)(
+ ContentsInsertsImages scan_master_src_for_insert_files_and_import_content(O)(
O _opt_action,
char[][] sourcefile_body_content,
string fn_src
@@ -290,14 +304,14 @@ static template spineRawMarkupContent() {
);
}
auto ins = Inserts();
- auto contents_insert_tu = ins.scan_subdoc_source(
+ ContentsAndImages contents_insert_tu = ins.scan_subdoc_source(
_opt_action,
markup_sourcefile_insert_content,
fn_src_insert.to!string
);
- contents ~= contents_insert_tu[0]; // images to extract for image list?
+ contents ~= contents_insert_tu.insert_contents;
if (_opt_action.source || _opt_action.pod) {
- auto _image_linelist = _extract_images(contents_insert_tu[0]);
+ string[] _image_linelist = _extract_images(contents_insert_tu.images);
if (_image_linelist.length > 0) {
_images ~= _image_linelist;
}
@@ -315,7 +329,7 @@ static template spineRawMarkupContent() {
} else {
contents ~= line;
if (_opt_action.source || _opt_action.pod) {
- auto _image_linelist = _extract_images(line);
+ string[] _image_linelist = _extract_images(line);
if (_image_linelist.length > 0) {
_images ~= _image_linelist;
}
@@ -330,7 +344,7 @@ static template spineRawMarkupContent() {
writeln(__LINE__);
writeln(contents.length);
}
- Tuple!(char[][], string[], string[]) t = tuple(
+ ContentsInsertsImages t = tuple(
contents,
insert_file_list,
images
diff --git a/src/doc_reform/io_out/defaults.d b/src/doc_reform/io_out/defaults.d
index 887c1be..4dd8021 100644
--- a/src/doc_reform/io_out/defaults.d
+++ b/src/doc_reform/io_out/defaults.d
@@ -35,7 +35,7 @@ template InternalMarkup() {
string tc_p = "┆";
string img = "☼";
string sep = "␣";
- string on_o = "「"; auto on_c = "」";
+ string on_o = "「"; string on_c = "」";
string mk_bullet = "● ";
static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") {
_indent_spaces = replicate(_indent_spaces, indent);
diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d
index 35a31cd..4de98a1 100644
--- a/src/doc_reform/io_out/epub3.d
+++ b/src/doc_reform/io_out/epub3.d
@@ -131,7 +131,7 @@ template outputEPub3() {
string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) @safe {
enum DomTags { none, open, close, close_and_open, open_still, }
auto markup = InlineMarkup();
- auto rgx = Rgx();
+ static auto rgx = Rgx();
string toc =format("<html xmlns=\"http://www.w3.org/1999/xhtml\"
xmlns:epub=\"http://www.idpf.org/2007/ops\">
<head>
@@ -211,7 +211,7 @@ template outputEPub3() {
int counter = 0;
string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO shared elsewhere
auto markup = InlineMarkup();
- auto rgx = Rgx();
+ static auto rgx = Rgx();
enum DomTags { none, open, close, close_and_open, open_still, }
string toc = format(q"┃<?xml version='1.0' encoding='utf-8'?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
@@ -303,7 +303,7 @@ template outputEPub3() {
) { // @trusted
mixin spineOutputRgxInit;
auto xhtml_format = outputXHTMLs();
- auto rgx = Rgx();
+ static auto rgx = Rgx();
string[] doc;
string segment_filename;
string[] top_level_headings = ["","","",""];
diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d
index 458533c..8598ca5 100644
--- a/src/doc_reform/io_out/html.d
+++ b/src/doc_reform/io_out/html.d
@@ -19,7 +19,7 @@ template outputHTML() {
) @safe {
mixin spineOutputRgxInit;
auto xhtml_format = outputXHTMLs();
- auto rgx = Rgx();
+ static auto rgx = Rgx();
string[] doc_html;
string[] doc;
string suffix = ".html";
@@ -211,7 +211,7 @@ template outputHTML() {
M doc_matters,
) @safe {
mixin spineOutputRgxInit;
- auto rgx = Rgx();
+ static auto rgx = Rgx();
auto xhtml_format = outputXHTMLs();
string[][string] doc_html;
string[][string] doc_html_endnotes;
@@ -468,7 +468,7 @@ template outputHTML() {
static assert(is(typeof(doc_html) == string[][string]));
}
mixin spineOutputRgxInit;
- auto rgx = Rgx();
+ static auto rgx = Rgx();
auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
auto xhtml_format = outputXHTMLs();
auto m = doc_matters.src.filename.matchFirst(rgx.src_fn);
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index 52707db..cfa347c 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -9,7 +9,7 @@ template outputLaTeX() {
std.conv : to;
mixin InternalMarkup; // watch
mixin spineOutputRgxInit;
- auto rgx = Rgx();
+ static auto rgx = Rgx();
mixin spineLanguageCodes;
auto lang = Lang();
auto paper() {
@@ -1180,8 +1180,8 @@ string table(O,M)(
f.writeln(latex_content.content);
f.writeln(latex_content.tail);
foreach (image; doc_matters.srcs.image_list) {
- auto fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image;
- auto fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image;
+ string fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image;
+ string fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image;
if (exists(fn_src_in)) {
fn_src_in.copy(fn_src_out_file);
}
diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d
index b935734..8201926 100644
--- a/src/doc_reform/io_out/metadata.d
+++ b/src/doc_reform/io_out/metadata.d
@@ -1,9 +1,9 @@
-module spine.io_out.metadata;
+module doc_reform.io_out.metadata;
template outputMetadata() {
void outputMetadata(T)( T doc_matters) @safe {
import std.file;
import std.format;
- import spine.io_out;
+ import doc_reform.io_out;
mixin InternalMarkup;
string[] metadata_;
string theme_dark_0 = format(q"┃
diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d
index 09bcf65..23eb947 100644
--- a/src/doc_reform/io_out/odt.d
+++ b/src/doc_reform/io_out/odt.d
@@ -604,7 +604,7 @@ template outputODT() {
doc_reform.io_out.xmls_css;
mixin InternalMarkup;
mixin spineOutputRgxInit;
- auto rgx = Rgx();
+ static auto rgx = Rgx();
// mixin outputXmlODT;
string odt_head(I)(I doc_matters) @safe {
string _has_tables = format(q"┃
diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d
index f9a17d4..e83a75f 100644
--- a/src/doc_reform/io_out/sqlite.d
+++ b/src/doc_reform/io_out/sqlite.d
@@ -128,7 +128,7 @@ template SQLiteDbRun() {
}
}
template SQLinsertDelimiter() {
- auto SQLinsertDelimiter(string _txt) {
+ string SQLinsertDelimiter(string _txt) {
_txt = _txt
.replaceAll(rgx.quotation_mark_sql_insert_delimiter, "$0$0");
return _txt;
@@ -406,7 +406,7 @@ template SQLiteFormatAndLoadObject() {
}
return _txt;
}
- Tuple!(string, string) inline_notes_seg(M,O)(
+ Tuple!(string, string[]) inline_notes_seg(M,O)(
M doc_matters,
const O obj,
string _txt,
@@ -439,7 +439,7 @@ template SQLiteFormatAndLoadObject() {
writeln(__LINE__, " endnote: ", obj.metainfo.is_a, ": ", obj.text);
}
}
- Tuple!(string, string) t = tuple(
+ Tuple!(string, string[]) t = tuple(
_txt,
_endnotes,
);
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index b14a7bf..1d58e27 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -458,9 +458,9 @@ template outputXHTMLs() {
return _txt;
}
Tuple!(string, string[]) inline_notes_seg(O,M)(
- string _txt,
- const O obj,
- M doc_matters,
+ string _txt,
+ const O obj,
+ M doc_matters,
) @safe {
string[] _endnotes;
if (obj.has.inline_notes_star) {
@@ -554,7 +554,7 @@ template outputXHTMLs() {
_txt = inline_images(_txt, obj, doc_matters, _suffix, _xml_type); // TODO
_txt = inline_links(_txt, obj, doc_matters, _suffix, _xml_type); // TODO
}
- auto t = inline_notes_seg(_txt, obj, doc_matters);
+ Tuple!(string, string[]) t = inline_notes_seg(_txt, obj, doc_matters);
return t;
}
string lev4_heading_subtoc(O,M)(
diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d
index c1d6f2c..121605a 100644
--- a/src/doc_reform/meta/conf_make_meta_structs.d
+++ b/src/doc_reform/meta/conf_make_meta_structs.d
@@ -15,7 +15,7 @@ import
mixin spineRgxInit;
static auto rgx = Rgx();
mixin InternalMarkup;
-auto mkup = InlineMarkup();
+static auto mkup = InlineMarkup();
string url_markup(string line) @safe {
string line_ = line
.replaceAll(
diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d
index b3f6bba..0b6388b 100644
--- a/src/doc_reform/meta/defaults.d
+++ b/src/doc_reform/meta/defaults.d
@@ -188,7 +188,7 @@ template InternalMarkup() {
string tc_p = "┆";
string img = "☼";
string sep = "␣";
- string on_o = "「"; auto on_c = "」";
+ string on_o = "「"; string on_c = "」";
string mk_bullet = "● ";
static string indent_by_spaces_provided(int indent, string _indent_spaces ="░░") {
_indent_spaces = replicate(_indent_spaces, indent);
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index d37e029..6dbbb22 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -89,6 +89,28 @@ template docAbstraction() {
int[] dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
int[] dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+ alias TxtPlusHasFootnotes = Tuple!(
+ string, "obj_txt",
+ bool, "has_notes_reg",
+ bool, "has_notes_star",
+ bool, "has_notes_plus",
+ );
+ alias TxtPlusHasFootnotesUrlsImages = Tuple!(
+ string, "obj_txt",
+ bool, "has_notes_reg",
+ bool, "has_notes_star",
+ bool, "has_notes_plus",
+ bool, "has_urls",
+ bool, "has_images_without_dimensions",
+ );
+ alias TxtAndAnchorTagPlusHasFootnotesUrlsImages = Tuple!(
+ string, "obj_txt",
+ string, "anchor_tag",
+ bool, "has_notes_reg",
+ bool, "has_notes_star",
+ bool, "has_links",
+ bool, "has_images_without_dimensions",
+ );
enum DomTags { none, open, close, close_and_open, open_still, }
pure ObjGenericComposite obj_heading_ancestors()(
ObjGenericComposite obj,
@@ -957,7 +979,7 @@ template docAbstraction() {
: ocn_emit(obj_type_status["ocn_status"]);
an_object["is"] = "heading";
an_object_key="body_nugget";
- auto substantive_object_and_anchor_tags_tuple
+ 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];
anchor_tag = substantive_object_and_anchor_tags_tuple[sObj.anchor_tag];
@@ -1096,7 +1118,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"],
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -2855,7 +2877,7 @@ template docAbstraction() {
);
}
an_object["is"] = "verse";
- auto substantive_obj_misc_tuple
+ 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];
@@ -2918,7 +2940,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -2964,7 +2986,7 @@ template docAbstraction() {
}
processing.remove("verse");
an_object["is"] = "verse";
- auto substantive_obj_misc_tuple
+ 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];
@@ -3027,7 +3049,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -3329,7 +3351,7 @@ template docAbstraction() {
"table"
);
an_object["is"] = "table";
- auto substantive_obj_misc_tuple
+ 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;
@@ -3393,7 +3415,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -3444,7 +3466,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -3495,7 +3517,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -3582,7 +3604,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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];
@@ -3634,7 +3656,7 @@ template docAbstraction() {
heading_ptr-1,
an_object["is"]
);
- auto substantive_obj_misc_tuple
+ 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;
@@ -4347,7 +4369,7 @@ template docAbstraction() {
}
return obj_txt_in;
}
- Tuple!(string, bool, bool, bool) footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) @safe {
+ TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) @safe {
/+ endnotes (regular) +/
bool flg_notes_reg = false;
bool flg_notes_star = false;
@@ -4403,7 +4425,7 @@ template docAbstraction() {
} else {
obj_txt_out = obj_txt_in;
}
- Tuple!(string, bool, bool, bool) t = tuple(
+ TxtPlusHasFootnotes t = tuple(
obj_txt_out,
flg_notes_reg,
flg_notes_star,
@@ -4411,7 +4433,7 @@ template docAbstraction() {
);
return t;
}
- private Tuple!(string, bool, bool, bool, bool, bool) object_notes_and_links_()(
+ private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
string obj_txt_in,
bool reset_note_numbers=false
) @safe {
@@ -4445,8 +4467,8 @@ template docAbstraction() {
obj_txt_in = obj_txt_in
.replaceAll(rgx.para_inline_link_anchor, "┃$1┃");
}
- Tuple!(string, bool, bool, bool) ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
- obj_txt_out = ftn[0];
+ TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
+ obj_txt_out = ftn.obj_txt;
debug(footnotes) {
writeln(obj_txt_out, tail);
}
@@ -4458,18 +4480,18 @@ template docAbstraction() {
writeln(m.hit);
}
}
- Tuple!(string, bool, bool, bool, bool, bool) t = tuple(
+ TxtPlusHasFootnotesUrlsImages t = tuple(
obj_txt_out,
- ftn[1],
- ftn[2],
- ftn[3],
+ ftn.has_notes_reg,
+ ftn.has_notes_star,
+ ftn.has_notes_plus,
urls,
images_without_dimensions,
);
return t;
}
auto init() {
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_("");
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_("");
return t;
}
invariant() {
@@ -4482,7 +4504,7 @@ template docAbstraction() {
.replaceFirst(rgx.heading, "")
.replaceFirst(rgx.object_number_off_all, "")
.strip;
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
debug(munge) {
writeln(__LINE__);
writeln(obj_txt_in);
@@ -4497,7 +4519,7 @@ template docAbstraction() {
obj_txt["munge"]=(obj_txt_in)
.replaceFirst(rgx.para_attribs, "")
.replaceFirst(rgx.object_number_off_all, "");
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]);
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
debug(munge) {
writeln(__LINE__);
writeln(obj_txt_in);
@@ -4514,21 +4536,21 @@ template docAbstraction() {
}
auto munge_group(string obj_txt_in) @safe {
obj_txt["munge"]=obj_txt_in;
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]);
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
}
auto munge_block()(string obj_txt_in) @safe {
obj_txt["munge"]=obj_txt_in;
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]);
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
}
auto munge_verse()(string obj_txt_in) @safe {
obj_txt["munge"]=obj_txt_in;
- Tuple!(string, bool, bool, bool, bool, bool) t = object_notes_and_links_(obj_txt["munge"]);
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
@@ -4558,7 +4580,7 @@ template docAbstraction() {
static auto munge = ObjInlineMarkupMunge();
string[string] obj_txt;
static string anchor_tag = "";
- auto obj_inline_markup_and_anchor_tags_and_misc(CMM)(
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(
string[string] obj_,
string obj_key_,
CMM conf_make_meta,
@@ -4638,7 +4660,7 @@ template docAbstraction() {
obj_notes_and_links["image_no_dimensions"] = x[5];
break;
}
- Tuple!(string, string, bool, bool, bool, bool) t = tuple(
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple(
obj_txt["munge"],
anchor_tag,
obj_notes_and_links["notes_reg"],
diff --git a/src/doc_reform/meta/metadoc_harvest.d b/src/doc_reform/meta/metadoc_harvest.d
index 4bb62ae..eb050e4 100644
--- a/src/doc_reform/meta/metadoc_harvest.d
+++ b/src/doc_reform/meta/metadoc_harvest.d
@@ -18,7 +18,7 @@ template spineMetaDocHarvest() {
std.utf,
std.conv : to;
mixin InternalMarkup;
- auto markup = InlineMarkup();
+ static auto mkup = InlineMarkup();
import doc_reform.io_out.paths_output;
auto pth_html_abs = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
auto pth_html_rel = spineDocRootTreeHTML!()(doc_matters.src.language);
diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d
index 19ed583..3a7aebc 100644
--- a/src/doc_reform/meta/metadoc_harvests_authors.d
+++ b/src/doc_reform/meta/metadoc_harvests_authors.d
@@ -14,7 +14,7 @@ module doc_reform.meta.metadoc_harvests_authors;
mixin InternalMarkup;
mixin spineRgxInit;
template spineMetaDocHarvestsAuthors() {
- auto mkup = InlineMarkup();
+ static auto mkup = InlineMarkup();
void spineMetaDocHarvestsAuthors(H,M,O)(
H harvests,
M _make_and_meta_struct,
diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d
index 5e11b7e..8c41f3b 100644
--- a/src/doc_reform/meta/metadoc_harvests_topics.d
+++ b/src/doc_reform/meta/metadoc_harvests_topics.d
@@ -14,7 +14,7 @@ module doc_reform.meta.metadoc_harvests_topics;
mixin InternalMarkup;
mixin spineRgxInit;
template spineMetaDocHarvestsTopics() {
- auto mkup = InlineMarkup();
+ static auto mkup = InlineMarkup();
void spineMetaDocHarvestsTopics(H,M,O)(
H hvst,
M _make_and_meta_struct,