aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/xmls.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-02-04 18:48:25 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-02-05 18:26:02 -0500
commit30b6d716f3e4448667ee61bdda044df739d6ad68 (patch)
tree8cbe98e04605f388bc52cb368198833121cf1f8a /src/doc_reform/io_out/xmls.d
parentcodegen cgi search removed (using src in org-mode) (diff)
epub, work on
Diffstat (limited to 'src/doc_reform/io_out/xmls.d')
-rw-r--r--src/doc_reform/io_out/xmls.d20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d
index 66661cf..6191fa9 100644
--- a/src/doc_reform/io_out/xmls.d
+++ b/src/doc_reform/io_out/xmls.d
@@ -99,16 +99,14 @@ template outputXHTMLs() {
.replaceAll(rgx.xhtml_quotation, "&quot;") // "&#34;"
.replaceAll(rgx.xhtml_less_than, "&lt;") // "&#60;"
.replaceAll(rgx.xhtml_greater_than, "&gt;") // "&#62;"
- .replaceAll(rgx.br_line, "<br>")
- .replaceAll(rgx.br_nl, "<br>")
+ .replaceAll(rgx.br_line, "<br />")
.replaceAll(rgx.nbsp_char, " ");
return _txt;
}
@safe string special_characters_date(string _txt) {
_txt = _txt
.replaceAll(regex(r"(?:-00)+"), "")
- .replaceAll(rgx.br_line, "<br>")
- .replaceAll(rgx.br_nl, "<br>")
+ .replaceAll(rgx.br_line, "<br />")
.replaceAll(rgx.nbsp_char, " ");
return _txt;
}
@@ -237,7 +235,7 @@ template outputXHTMLs() {
.replaceAll(
rgx.br_line, "")
.replaceAll(
- rgx.br_nl, "");
+ rgx.br_newline_inline, "");
} else {
_locations = "<p class=\"tiny_left\"><a href=\"https://www.doc-reform.org\">spine</a></p>\n<p class=\"tiny_left\"><a href=\"https://git.sisudoc.org/software/spine/\">sources / git</a></p>\n<p class=\"tiny_left\"><a href=\"https://www.sisudoc.org\">www.sisudoc.org</a></p>";
}
@@ -812,14 +810,16 @@ template outputXHTMLs() {
(doc_matters.opt.action.ocn_off)
? "" : ((obj.metainfo.object_number.empty)
? "" : obj.metainfo.identifier),
- obj.metainfo.heading_lev_markup,
+ ((_xml_type == "epub" && obj.metainfo.heading_lev_markup == 0) ? 1
+ : obj.metainfo.heading_lev_markup),
obj.metainfo.is_a,
obj.metainfo.identifier,
obj.metainfo.identifier,
tags,
heading_lev_anchor_tag,
_txt,
- obj.metainfo.heading_lev_markup,
+ ((_xml_type == "epub" && obj.metainfo.heading_lev_markup == 0) ? 1
+ : obj.metainfo.heading_lev_markup),
);
} else {
o = format(q"┃%s
@@ -829,12 +829,14 @@ template outputXHTMLs() {
</h%s>
</div>┃",
_horizontal_rule,
- obj.metainfo.heading_lev_markup,
+ ((_xml_type == "epub" && obj.metainfo.heading_lev_markup == 0) ? 1
+ : obj.metainfo.heading_lev_markup),
obj.metainfo.is_a,
tags,
heading_lev_anchor_tag,
_txt,
- obj.metainfo.heading_lev_markup,
+ ((_xml_type == "epub" && obj.metainfo.heading_lev_markup == 0) ? 1
+ : obj.metainfo.heading_lev_markup),
);
}
return o;