aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/xmls.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-11-25 22:06:40 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-12-23 18:17:41 -0500
commitf6d28b62f0e02b8a88a1832589e203c7a613f45b (patch)
treeb5d6462e45bae998190194784e02b143a83f79a3 /src/doc_reform/io_out/xmls.d
parentgitignore & things nix (diff)
regex review, match speed & compile time, ctregex
- improve match time - add interim fontface identifier marker - improve compile time - remove unused regexs - separate out some specialized output matches
Diffstat (limited to 'src/doc_reform/io_out/xmls.d')
-rw-r--r--src/doc_reform/io_out/xmls.d15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index 0b0dce7..131dbb6 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -57,12 +57,17 @@ template outputXHTMLs() {
std.conv : to;
import
doc_reform.io_out,
+ doc_reform.io_out.rgx,
+ doc_reform.meta.rgx_files,
+ doc_reform.io_out.rgx_xhtml,
doc_reform.io_out.create_zip_file,
doc_reform.io_out.xmls,
doc_reform.io_out.xmls_css;
mixin spineRgxOut;
+ mixin spineRgxXHTML;
struct outputXHTMLs {
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
@safe string div_delimit(
string part,
return ref string previous_part
@@ -95,10 +100,10 @@ template outputXHTMLs() {
}
@safe string special_characters_text(string _txt) {
_txt = _txt
- .replaceAll(rgx.xhtml_ampersand, "&amp;") // "&#38;"
- .replaceAll(rgx.xhtml_quotation, "&quot;") // "&#34;"
- .replaceAll(rgx.xhtml_less_than, "&lt;") // "&#60;"
- .replaceAll(rgx.xhtml_greater_than, "&gt;") // "&#62;"
+ .replaceAll(rgx_xhtml.ampersand, "&amp;") // "&#38;"
+ .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_line_inline, "<br />")
.replaceAll(rgx.br_line_spaced, "<br />\n<br />")
@@ -161,7 +166,7 @@ template outputXHTMLs() {
}
if (!(obj.metainfo.is_a == "code")) {
_txt = (_txt)
- .replaceAll(rgx.xhtml_line_break, "<br />");
+ .replaceAll(rgx_xhtml.line_break, "<br />");
}
return _txt;
}