diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-04-10 14:25:38 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-05-17 16:59:54 -0400 |
commit | 6d337554a5354b5ac3825f8103a90476edea46ac (patch) | |
tree | a0c41d08a2488503c0770adab77989b0898dce5c /src/doc_reform/output/epub3.d | |
parent | 0.6.0 docReform project license AGPLv3+ (diff) |
text format delimiter, use: "┃" instead of "┋"
- gdc has compilation issue with the "┋" character,
not worth arguing, make internal marker changes
(can be changed again)
- text format delimiter
rg -l "┋" org/. | xargs sed -i 's/┋/┃/g'
Diffstat (limited to 'src/doc_reform/output/epub3.d')
-rw-r--r-- | src/doc_reform/output/epub3.d | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/doc_reform/output/epub3.d b/src/doc_reform/output/epub3.d index e02637c..a49bb5d 100644 --- a/src/doc_reform/output/epub3.d +++ b/src/doc_reform/output/epub3.d @@ -16,25 +16,25 @@ template outputEPub3() { mixin outputXHTMLs; string epub3_mimetypes() { string o; - o = format(q"┋application/epub+zip┋") ~ "\n"; + o = format(q"┃application/epub+zip┃") ~ "\n"; return o; } string epub3_container_xml() { string o; - o = format(q"┋<?xml version='1.0' encoding='utf-8'?>┋") ~ "\n"; - o ~= format(q"┋<container version="1.0" + o = format(q"┃<?xml version='1.0' encoding='utf-8'?>┃") ~ "\n"; + o ~= format(q"┃<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml" /> - </rootfiles>┋") ~ "\n</container>\n"; + </rootfiles>┃") ~ "\n</container>\n"; return o; } string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { auto xhtml_format = outputXHTMLs(); auto pth_epub3 = DocReformPathsEPUB!()(doc_matters.output_path, doc_matters.src.language); string _uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! - string content = format(q"┋ <?xml version='1.0' encoding='utf-8'?> + string content = format(q"┃ <?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="EPB-UUID"> <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -61,7 +61,7 @@ template outputEPub3() { <link rel="stylesheet" href="%s" type="text/css" id="main-css" /> <!-- nav epub3 navigation --> <item id="nav" href="toc_nav.xhtml" media-type="application/xhtml+xml" properties="nav" /> - ┋", + ┃", _uuid, xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_full), xhtml_format.special_characters_text(doc_matters.conf_make_meta.meta.title_main), @@ -86,8 +86,8 @@ template outputEPub3() { // TODO sort jpg & png content ~= " " ~ "<!-- Images -->" ~ "\n "; foreach (image; doc_matters.srcs.image_list) { - content ~= format(q"┋ <item id="%s" href="%s/%s" media-type="image/%s" /> - ┋", + content ~= format(q"┃ <item id="%s" href="%s/%s" media-type="image/%s" /> + ┃", image.baseName.stripExtension, (pth_epub3.doc_oebps_image(doc_matters.src.filename)).chompPrefix("OEBPS/"), image, @@ -213,7 +213,7 @@ template outputEPub3() { auto markup = InlineMarkup(); auto rgx = Rgx(); enum DomTags { none, open, close, close_and_open, open_still, } - string toc = format(q"┋<?xml version='1.0' encoding='utf-8'?> + string toc = format(q"┃<?xml version='1.0' encoding='utf-8'?> <ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"> <head> <!-- four required metadata items (for all NCX documents, @@ -232,7 +232,7 @@ template outputEPub3() { <docAuthor> <text>%s</text> </docAuthor> - <navMap>┋", + <navMap>┃", doc_matters.conf_make_meta.meta.title_full, // title (doc_matters.conf_make_meta.meta.creator_author.empty) ? "" : " by " ~ doc_matters.conf_make_meta.meta.creator_author, // author @@ -255,12 +255,12 @@ template outputEPub3() { case DomTags.close_and_open : ++counter; toc ~= "\n </navPoint>"; - toc ~= format(q"┋ + toc ~= format(q"┃ <navPoint class="chapter" id="navpoint" playOrder="%s"> <navLabel> <text>%s</text> </navLabel> - <content src="%s.xhtml%s" />┋", + <content src="%s.xhtml%s" />┃", counter, _txt, obj.tags.segment_anchor_tag_epub, @@ -269,12 +269,12 @@ template outputEPub3() { break; case DomTags.open : ++counter; - toc ~= format(q"┋ + toc ~= format(q"┃ <navPoint class="chapter" id="navpoint" playOrder="%s"> <navLabel> <text>%s</text> </navLabel> - <content src="%s.xhtml%s" />┋", + <content src="%s.xhtml%s" />┃", counter, _txt, obj.tags.segment_anchor_tag_epub, @@ -288,12 +288,12 @@ template outputEPub3() { } } } - toc ~= format(q"┋ + toc ~= format(q"┃ </navPoint> </navPoint> </navPoint> </navMap> - </ncx>┋"); + </ncx>┃"); return toc; } @@ -556,40 +556,40 @@ template outputEPub3() { assert(obj.text.length > 0); if (obj.metainfo.heading_lev_markup <= 4) { oepbs_content_parts["manifest_documents"] ~= - format(q"┋ <item id="%s.xhtml" href="%s.xhtml" media-type="application/xhtml+xml" /> - ┋", + format(q"┃ <item id="%s.xhtml" href="%s.xhtml" media-type="application/xhtml+xml" /> + ┃", obj.tags.segment_anchor_tag_epub, obj.tags.segment_anchor_tag_epub, ); oepbs_content_parts["spine"] ~= - format(q"┋ <itemref idref="%s.xhtml" linear="yes" /> - ┋", + format(q"┃ <itemref idref="%s.xhtml" linear="yes" /> + ┃", obj.tags.segment_anchor_tag_epub, ); oepbs_content_parts["guide"] ~= - format(q"┋ <reference type="%s" href="%s" /> - ┋", + format(q"┃ <reference type="%s" href="%s" /> + ┃", obj.tags.segment_anchor_tag_epub, obj.tags.segment_anchor_tag_epub, ); } else if (obj.metainfo.heading_lev_markup > 4) { oepbs_content_parts["manifest_documents"] ~= - format(q"┋ <item id="%s.xhtml#%s" href="%s.xhtml#%s" media-type="application/xhtml+xml" /> - ┋", + format(q"┃ <item id="%s.xhtml#%s" href="%s.xhtml#%s" media-type="application/xhtml+xml" /> + ┃", obj.tags.segment_anchor_tag_epub, obj.metainfo.object_number, obj.tags.segment_anchor_tag_epub, obj.metainfo.object_number, ); oepbs_content_parts["spine"] ~= - format(q"┋ <itemref idref="%s.xhtml#%s" linear="yes" /> - ┋", + format(q"┃ <itemref idref="%s.xhtml#%s" linear="yes" /> + ┃", obj.tags.segment_anchor_tag_epub, obj.metainfo.object_number, ); oepbs_content_parts["guide"] ~= - format(q"┋ <reference type="%s#%s" href="%s#%s" /> - ┋", + format(q"┃ <reference type="%s#%s" href="%s#%s" /> + ┃", obj.tags.segment_anchor_tag_epub, obj.metainfo.object_number, obj.tags.segment_anchor_tag_epub, |