aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/epub3.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out/epub3.d')
-rw-r--r--src/doc_reform/io_out/epub3.d30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d
index 54568ff..7a646fb 100644
--- a/src/doc_reform/io_out/epub3.d
+++ b/src/doc_reform/io_out/epub3.d
@@ -157,8 +157,8 @@ template outputEPub3() {
content ~= " " ~ "</guide>" ~ "\n ";
content ~= "" ~ "</package>";
debug(epubmanifest) {
- foreach (part; doc_matters.has.keys_seq.seg) { // TODO
- foreach (obj; doc_abstraction[part]) {
+ foreach (section; doc_matters.has.keys_seq.seg) { // TODO
+ foreach (obj; doc_abstraction[section]) {
if (obj.metainfo.is_a == "heading") {
if (obj.metainfo.heading_lev_markup == 4) {
writefln(
@@ -321,11 +321,11 @@ template outputEPub3() {
string[] doc_parts;
}
auto epubWrite = writeOut();
- foreach (part; doc_matters.has.keys_seq.seg) {
- foreach (obj; doc_abstraction[part]) {
+ foreach (section; doc_matters.has.keys_seq.seg) {
+ foreach (obj; doc_abstraction[section]) {
string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj);
if (obj.metainfo.is_a == "heading") {
- assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
+ assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
switch (obj.metainfo.heading_lev_markup) {
case 0: .. case 3:
/+ fill buffer, and replace with new levels from 1 to 3 +/
@@ -386,10 +386,10 @@ template outputEPub3() {
break;
}
} else {
- assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
+ assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
Tuple!(string, string[]) t;
switch (obj.metainfo.is_of_part) {
- case "frontmatter": assert(part == "head" || "toc");
+ case "frontmatter": assert(section == "head" || "toc");
switch (obj.metainfo.is_of_type) {
case "para":
switch (obj.metainfo.is_a) {
@@ -416,7 +416,7 @@ template outputEPub3() {
break;
}
break;
- case "body": assert(part == "body");
+ case "body": assert(section == "body");
switch (obj.metainfo.is_of_type) {
case "para":
switch (obj.metainfo.is_a) {
@@ -484,35 +484,35 @@ template outputEPub3() {
}
break;
case "backmatter":
- assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
+ assert(section == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail");
switch (obj.metainfo.is_of_type) {
case "para":
switch (obj.metainfo.is_a) {
- case "endnote": assert(part == "endnotes");
+ case "endnote": assert(section == "endnotes");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
break;
- case "glossary": assert(part == "glossary");
+ case "glossary": assert(section == "glossary");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
- case "bibliography": assert(part == "bibliography");
+ case "bibliography": assert(section == "bibliography");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
- case "bookindex": assert(part == "bookindex");
+ case "bookindex": assert(section == "bookindex");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
- case "blurb": assert(part == "blurb");
+ case "blurb": assert(section == "blurb");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
- case "tail": assert(part == "tail");
+ case "tail": assert(section == "tail");
t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];