From 2cdc5d2a7c62e54009e915d6f6a9da87905e2699 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 29 Aug 2021 19:06:01 -0400 Subject: xmls, epub3 toc_nav.xhtml toc.ncx --- src/doc_reform/io_out/xmls.d | 76 ++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/doc_reform/io_out/xmls.d') diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index 703df3d..ab80a09 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -95,10 +95,10 @@ template outputXHTMLs() { } @safe string special_characters_text(string _txt) { _txt = _txt - .replaceAll(rgx.xhtml_ampersand, "&") - .replaceAll(rgx.xhtml_quotation, """) - .replaceAll(rgx.xhtml_less_than, "<") - .replaceAll(rgx.xhtml_greater_than, ">") + .replaceAll(rgx.xhtml_ampersand, "&") // "&" + .replaceAll(rgx.xhtml_quotation, """) // """ + .replaceAll(rgx.xhtml_less_than, "<") // "<" + .replaceAll(rgx.xhtml_greater_than, ">") // ">" .replaceAll(rgx.nbsp_char, " "); return _txt; } @@ -131,7 +131,7 @@ template outputXHTMLs() { if (obj.tags.anchor_tags.length > 0) { foreach (tag; obj.tags.anchor_tags) { if (!(tag.empty)) { - tags ~= ""; + tags ~= ""; } } } @@ -158,19 +158,19 @@ template outputXHTMLs() { ā”ƒ", - doc_matters.conf_make_meta.meta.title_full.replaceAll(regex("\""), """), - doc_matters.conf_make_meta.meta.creator_author, + special_characters_text(doc_matters.conf_make_meta.meta.title_full), + special_characters_text(doc_matters.conf_make_meta.meta.creator_author), _publisher, - doc_matters.conf_make_meta.meta.date_published, - doc_matters.conf_make_meta.meta.date_created, - doc_matters.conf_make_meta.meta.date_issued, - doc_matters.conf_make_meta.meta.date_available, - doc_matters.conf_make_meta.meta.date_valid, - doc_matters.conf_make_meta.meta.date_modified, + special_characters_text(doc_matters.conf_make_meta.meta.date_published), + special_characters_text(doc_matters.conf_make_meta.meta.date_created), + special_characters_text(doc_matters.conf_make_meta.meta.date_issued), + special_characters_text(doc_matters.conf_make_meta.meta.date_available), + special_characters_text(doc_matters.conf_make_meta.meta.date_valid), + special_characters_text(doc_matters.conf_make_meta.meta.date_modified), doc_matters.src.language, - doc_matters.conf_make_meta.meta.rights_copyright, - doc_matters.opt.action.debug_do ? "" : doc_matters.generator_program.name_and_version, - doc_matters.generator_program.url_home, + special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + doc_matters.opt.action.debug_do ? "" : special_characters_text(doc_matters.generator_program.name_and_version), + special_characters_text(doc_matters.generator_program.url_home), ); return o; } @@ -266,9 +266,9 @@ template outputXHTMLs() {
%s
%s%sā”ƒ", - doc_matters.conf_make_meta.meta.title_full, + special_characters_text(doc_matters.conf_make_meta.meta.title_full), (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" - : ", " ~ doc_matters.conf_make_meta.meta.creator_author, + : ", " ~ special_characters_text(doc_matters.conf_make_meta.meta.creator_author), header_metadata(doc_matters), ((type == "seg") ? "../" : ""), ((type == "seg") @@ -330,22 +330,22 @@ template outputXHTMLs() { ā”ƒ", html_simple, - doc_matters.conf_make_meta.meta.title_full.replaceAll(regex("\""), """), + special_characters_text(doc_matters.conf_make_meta.meta.title_full), (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" - : ", " ~ doc_matters.conf_make_meta.meta.creator_author, - doc_matters.conf_make_meta.meta.title_full, + : ", " ~ special_characters_text(doc_matters.conf_make_meta.meta.creator_author), + special_characters_text(doc_matters.conf_make_meta.meta.title_full), (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" - : ", " ~ doc_matters.conf_make_meta.meta.creator_author, - doc_matters.conf_make_meta.meta.date_published, - doc_matters.conf_make_meta.meta.date_created, - doc_matters.conf_make_meta.meta.date_issued, - doc_matters.conf_make_meta.meta.date_available, - doc_matters.conf_make_meta.meta.date_valid, - doc_matters.conf_make_meta.meta.date_modified, + : ", " ~ special_characters_text(doc_matters.conf_make_meta.meta.creator_author), + special_characters_text(doc_matters.conf_make_meta.meta.date_published), + special_characters_text(doc_matters.conf_make_meta.meta.date_created), + special_characters_text(doc_matters.conf_make_meta.meta.date_issued), + special_characters_text(doc_matters.conf_make_meta.meta.date_available), + special_characters_text(doc_matters.conf_make_meta.meta.date_valid), + special_characters_text(doc_matters.conf_make_meta.meta.date_modified), doc_matters.src.language, - doc_matters.conf_make_meta.meta.rights_copyright, - doc_matters.generator_program.name_and_version, - doc_matters.generator_program.url_home, + special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright), + special_characters_text(doc_matters.generator_program.name_and_version), + special_characters_text(doc_matters.generator_program.url_home), doc_matters.src.language, ); return o; @@ -587,7 +587,7 @@ template outputXHTMLs() { } return _txt; } - @safe auto inline_markup_seg(O,M)( + @safe Tuple!(string, string[]) inline_markup_seg(O,M)( string _txt, const O obj, M doc_matters, @@ -792,7 +792,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0]; string[] _endnotes = t[1]; string o = heading(_txt, obj, doc_matters, _xml_type); @@ -872,7 +872,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0].to!string; string[] _endnotes = t[1]; string o = para(_txt, obj, doc_matters); @@ -935,7 +935,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0].to!string; string[] _endnotes = t[1]; string o = quote(_txt, obj, doc_matters); @@ -1001,7 +1001,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0].to!string; string[] _endnotes = t[1]; string o = group(_txt, obj, doc_matters); @@ -1063,7 +1063,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0].to!string; string[] _endnotes = t[1]; string o = block(_txt, obj, doc_matters); @@ -1123,7 +1123,7 @@ template outputXHTMLs() { string _suffix = ".html", string _xml_type = "html", ) { - auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); + Tuple!(string, string[]) t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type); _txt = t[0].to!string; string[] _endnotes = t[1]; string o = verse(_txt, obj, doc_matters); -- cgit v1.2.3