From f6d28b62f0e02b8a88a1832589e203c7a613f45b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 25 Nov 2022 22:06:40 -0500 Subject: 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 --- src/doc_reform/io_out/html.d | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/doc_reform/io_out/html.d') diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 26636ba..dd50252 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -57,6 +57,9 @@ template outputHTML() { 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; @@ -66,8 +69,10 @@ template outputHTML() { M doc_matters, ) { mixin spineRgxOut; + mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); string[] doc_html; string[] doc; string suffix = ".html"; @@ -257,7 +262,9 @@ template outputHTML() { M doc_matters, ) { mixin spineRgxOut; + mixin spineRgxXHTML; static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); auto xhtml_format = outputXHTMLs(); string[][string] doc_html; string[][string] doc_html_endnotes; @@ -508,11 +515,11 @@ template outputHTML() { debug(asserts) { static assert(is(typeof(doc_html) == string[][string])); } - mixin spineRgxOut; - static auto rgx = RgxO(); + mixin spineRgxFiles; + static auto rgx_files = RgxFiles(); auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); - auto m = doc_matters.src.filename.matchFirst(rgx.src_fn); + auto m = doc_matters.src.filename.matchFirst(rgx_files.src_fn); try { if (!exists(pth_html.seg(doc_matters.src.filename))) { pth_html.seg(doc_matters.src.filename).mkdirRecurse; -- cgit v1.2.3