diff options
Diffstat (limited to 'src/doc_reform/io_out/epub3.d')
-rw-r--r-- | src/doc_reform/io_out/epub3.d | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index d19545c..41d6d9d 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -58,18 +58,21 @@ template outputEPub3() { std.conv : to; import doc_reform.io_out, + doc_reform.io_out.rgx, + 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 InternalMarkup; mixin outputXHTMLs; static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); @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.br_line, "<br />") .replaceAll(rgx.br_line_inline, "<br />") .replaceAll(rgx.br_line_spaced, "<br />\n<br />") @@ -184,6 +187,7 @@ template outputEPub3() { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); string toc; bool _new_title_set = false; string toc_head = format(q"┃<html xmlns="https://www.w3.org/1999/xhtml" @@ -297,8 +301,10 @@ template outputEPub3() { I doc_matters, ) { mixin spineRgxOut; + mixin spineRgxXHTML; auto xhtml_format = outputXHTMLs(); static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); string[] doc; string segment_filename; string[] top_level_headings = ["","","",""]; @@ -607,6 +613,7 @@ template outputEPub3() { static assert(is(typeof(epub_write.oebps_content_opf) == string)); } static auto rgx = RgxO(); + static auto rgx_xhtml = RgxXHTML(); auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); auto xhtml_format = outputXHTMLs(); /+ zip file +/ |