aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/xmls.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-17 13:22:51 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-01-13 16:06:43 -0500
commit9c42b4567f35aceacce1298a6d4789d6789e5bfe (patch)
tree90d698066a2f895a152bb942ecdeed5faeff50af /src/doc_reform/io_out/xmls.d
parentpresent per document metadata (diff)
specify Tuple content for read in files, remove traits.std
Diffstat (limited to 'src/doc_reform/io_out/xmls.d')
-rw-r--r--src/doc_reform/io_out/xmls.d66
1 files changed, 32 insertions, 34 deletions
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index 4cb7507..739c379 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -176,9 +176,7 @@ template outputXHTMLs() {
_db,
);
} else {
- _form = format(q"┃%s┃",
- "",
- );
+ _form = format(q"┃%s┃", "");
}
o = format(q"┃<div class="flex-menu-option">%s
</div>┃",
@@ -467,7 +465,7 @@ template outputXHTMLs() {
}
return _txt;
}
- auto inline_notes_seg(O,M)(
+ Tuple!(string, string[]) inline_notes_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -525,7 +523,7 @@ template outputXHTMLs() {
writeln(__LINE__, " endnote: ", obj.metainfo.is_a, ": ", obj.text);
}
}
- auto t = tuple(
+ Tuple!(string, string[]) t = tuple(
_txt,
_endnotes,
);
@@ -754,7 +752,7 @@ template outputXHTMLs() {
string o = heading(_txt, obj, doc_matters);
return o;
}
- auto heading_seg(O,M)(
+ Tuple!(string, string[]) heading_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -765,7 +763,7 @@ template outputXHTMLs() {
_txt = t[0];
string[] _endnotes = t[1];
string o = heading(_txt, obj, doc_matters, _xml_type);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
@@ -830,7 +828,7 @@ template outputXHTMLs() {
string o = para(_txt, obj, doc_matters);
return o;
}
- auto para_seg(O,M)(
+ Tuple!(string, string[]) para_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -841,7 +839,7 @@ template outputXHTMLs() {
_txt = t[0].to!string;
string[] _endnotes = t[1];
string o = para(_txt, obj, doc_matters);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
@@ -893,7 +891,7 @@ template outputXHTMLs() {
string o = quote(_txt, obj, doc_matters);
return o;
}
- auto quote_seg(O,M)(
+ Tuple!(string, string[]) quote_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -904,7 +902,7 @@ template outputXHTMLs() {
_txt = t[0].to!string;
string[] _endnotes = t[1];
string o = quote(_txt, obj, doc_matters);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
@@ -957,7 +955,7 @@ template outputXHTMLs() {
string o = group(_txt, obj, doc_matters);
return o;
}
- auto group_seg(O,M)(
+ Tuple!(string, string[]) group_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -968,7 +966,7 @@ template outputXHTMLs() {
_txt = t[0].to!string;
string[] _endnotes = t[1];
string o = group(_txt, obj, doc_matters);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
@@ -1017,7 +1015,7 @@ template outputXHTMLs() {
string o = block(_txt, obj, doc_matters);
return o;
}
- auto block_seg(O,M)(
+ Tuple!(string, string[]) block_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -1028,7 +1026,7 @@ template outputXHTMLs() {
_txt = t[0].to!string;
string[] _endnotes = t[1];
string o = block(_txt, obj, doc_matters);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
@@ -1077,7 +1075,7 @@ template outputXHTMLs() {
string o = verse(_txt, obj, doc_matters);
return o;
}
- auto verse_seg(O,M)(
+ Tuple!(string, string[]) verse_seg(O,M)(
string _txt,
const O obj,
M doc_matters,
@@ -1088,13 +1086,13 @@ template outputXHTMLs() {
_txt = t[0].to!string;
string[] _endnotes = t[1];
string o = verse(_txt, obj, doc_matters);
- auto u = tuple(
+ Tuple!(string, string[]) u = tuple(
o,
_endnotes,
);
return u;
}
- auto tablarize(O)(
+ Tuple!(string, string) tablarize(O)(
string _txt,
const O obj,
) @safe {
@@ -1104,24 +1102,24 @@ template outputXHTMLs() {
string _tablenote;
foreach(row_idx, row; _table_rows) {
_table_cols = row.split(rgx.table_delimiter_col);
- _table ~= "<tr>";
- foreach(col_idx, cell; _table_cols) {
- if ((_table_cols.length == 1)
- && (_table_rows.length <= row_idx+2)) {
- _tablenote ~= cell;
- } else {
- string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
- string _align = ("style=\"text-align:"
- ~ ((obj.table.column_aligns[col_idx] == "l")
- ? "left\"" : "right\""));
- _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table.column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
- _table ~= cell;
- _table ~= "</" ~ _col_is ~ ">";
- }
+ _table ~= "<tr>";
+ foreach(col_idx, cell; _table_cols) {
+ if ((_table_cols.length == 1)
+ && (_table_rows.length <= row_idx+2)) {
+ _tablenote ~= cell;
+ } else {
+ string _col_is = (row_idx == 0 && obj.table.heading) ? "th" : "td";
+ string _align = ("style=\"text-align:"
+ ~ ((obj.table.column_aligns[col_idx] == "l")
+ ? "left\"" : "right\""));
+ _table ~= "<" ~ _col_is ~ " width=\"" ~ obj.table.column_widths[col_idx].to!string ~ "%\" " ~ _align ~ ">";
+ _table ~= cell;
+ _table ~= "</" ~ _col_is ~ ">";
}
- _table ~= "</tr>";
}
- auto t = tuple(
+ _table ~= "</tr>";
+ }
+ Tuple!(string, string) t = tuple(
_table,
_tablenote,
);