From e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Mar 2024 22:39:09 -0400 Subject: mark modules as @safe: (& identify what is not) --- src/doc_reform/io_out/epub3.d | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/doc_reform/io_out/epub3.d') diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index 808d9fb..cffc464 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -48,6 +48,7 @@ +/ module doc_reform.io_out.epub3; +@safe: template outputEPub3() { import std.file, @@ -66,7 +67,7 @@ template outputEPub3() { mixin outputXHTMLs; static auto rgx = RgxO(); static auto rgx_xhtml = RgxXHTML(); - @safe string special_characters_text(string _txt) { + string special_characters_text(string _txt) { _txt = _txt .replaceAll(rgx_xhtml.ampersand, "&") // "&" .replaceAll(rgx_xhtml.quotation, """) // """ @@ -78,12 +79,12 @@ template outputEPub3() { .replaceAll(rgx.nbsp_char, " "); return _txt; } - @safe string epub3_mimetypes() { + string epub3_mimetypes() { string o; o = format(q"┃application/epub+zip┃") ~ "\n"; return o; } - @safe string epub3_container_xml() { + string epub3_container_xml() { string o; o = format(q"┃┃") ~ "\n"; o ~= format(q"┃┃") ~ "\n\n"; return o; } - @safe string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { + string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { auto xhtml_format = outputXHTMLs(); auto pth_epub3 = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language); string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! @@ -182,7 +183,7 @@ template outputEPub3() { } return content; } - @safe string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { + string epub3_oebps_toc_nav_xhtml(D,I)(D doc_abstraction, I doc_matters) { enum DomTags { none, open, close, close_and_open, open_still, } auto markup = InlineMarkup(); static auto rgx = RgxO(); -- cgit v1.2.3