aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/xmls.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out/xmls.d')
-rw-r--r--src/doc_reform/io_out/xmls.d76
1 files changed, 38 insertions, 38 deletions
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 ~= "<a name=\"" ~ tag ~ "\"></a>";
+ tags ~= "<a name=\"" ~ special_characters_text(tag) ~ "\"></a>";
}
}
}
@@ -158,19 +158,19 @@ template outputXHTMLs() {
<meta name="generator" content="%s" />
<link rel="generator" href="%s" />
<!-- spine DocReform header metadata -->ā”ƒ",
- doc_matters.conf_make_meta.meta.title_full.replaceAll(regex("\""), "&quot;"),
- 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() {
<div class="flex-menu-option">
%s
</div>%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() {
<body lang="%s">
<a name="top" id="top"></a>ā”ƒ",
html_simple,
- doc_matters.conf_make_meta.meta.title_full.replaceAll(regex("\""), "&quot;"),
+ 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);