aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/xmls.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-01-25 14:36:59 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-01-25 20:58:41 -0500
commit3c2da303eed87e506533c738c1bcfda154944790 (patch)
tree0e5125110e58ef64ce13a980b281328f325740c6 /src/doc_reform/io_out/xmls.d
parentmetadata, topic register to json removed, unused (diff)
doc presentation, add option to include date with title and author
Diffstat (limited to 'src/doc_reform/io_out/xmls.d')
-rw-r--r--src/doc_reform/io_out/xmls.d14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index f0c7185..f4ca976 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -99,6 +99,16 @@ template outputXHTMLs() {
.replaceAll(rgx.xhtml_quotation, "&quot;") // "&#34;"
.replaceAll(rgx.xhtml_less_than, "&lt;") // "&#60;"
.replaceAll(rgx.xhtml_greater_than, "&gt;") // "&#62;"
+ .replaceAll(rgx.br_line, "<br>")
+ .replaceAll(rgx.br_nl, "<br>")
+ .replaceAll(rgx.nbsp_char, " ");
+ return _txt;
+ }
+ @safe string special_characters_date(string _txt) {
+ _txt = _txt
+ .replaceAll(regex(r"(?:-00)+"), "")
+ .replaceAll(rgx.br_line, "<br>")
+ .replaceAll(rgx.br_nl, "<br>")
.replaceAll(rgx.nbsp_char, " ");
return _txt;
}
@@ -202,7 +212,7 @@ template outputXHTMLs() {
special_characters_text(doc_matters.conf_make_meta.meta.title_full),
special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
_publisher,
- special_characters_text(doc_matters.conf_make_meta.meta.date_published),
+ special_characters_date(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),
@@ -382,7 +392,7 @@ template outputXHTMLs() {
special_characters_text(doc_matters.conf_make_meta.meta.title_full),
(doc_matters.conf_make_meta.meta.creator_author.empty) ? ""
: ", " ~ special_characters_text(doc_matters.conf_make_meta.meta.creator_author),
- special_characters_text(doc_matters.conf_make_meta.meta.date_published),
+ special_characters_date(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),