aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/odt.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out/odt.d')
-rw-r--r--src/doc_reform/io_out/odt.d23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d
index c5fb469..1cde2d4 100644
--- a/src/doc_reform/io_out/odt.d
+++ b/src/doc_reform/io_out/odt.d
@@ -50,7 +50,10 @@
+/
module doc_reform.io_out.odt;
template formatODT() {
- import doc_reform.io_out;
+ import
+ doc_reform.io_out,
+ doc_reform.io_out.rgx,
+ doc_reform.io_out.rgx_xhtml;
import
std.digest.sha,
std.file,
@@ -63,8 +66,10 @@ template formatODT() {
doc_reform.io_out.xmls,
doc_reform.io_out.xmls_css;
mixin spineRgxOut;
+ mixin spineRgxXHTML;
struct formatODT {
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
@safe string _tags(O)(const O obj) {
string _tags = "";
if (obj.tags.anchor_tags.length > 0) {
@@ -107,6 +112,7 @@ template formatODT() {
}
@safe string _footnotes()(string _txt) {
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
_txt = _txt.replaceAll(
rgx.inline_notes_al_regular_number_note,
format(q"┃<text:note text:id="ftn%s" text:note-class="footnote">
@@ -274,10 +280,10 @@ template formatODT() {
}
@safe string _special_characters(O)(string _txt, const O obj) {
_txt = _txt
- .replaceAll(rgx.xhtml_ampersand, "&amp;")
- .replaceAll(rgx.xhtml_quotation, "&#34;")
- .replaceAll(rgx.xhtml_less_than, "&lt;")
- .replaceAll(rgx.xhtml_greater_than, "&gt;")
+ .replaceAll(rgx_xhtml.ampersand, "&amp;")
+ .replaceAll(rgx_xhtml.quotation, "&#34;")
+ .replaceAll(rgx_xhtml.less_than, "&lt;")
+ .replaceAll(rgx_xhtml.greater_than, "&gt;")
.replaceAll(rgx.nbsp_char, "&#160;");
return _txt;
}
@@ -640,7 +646,10 @@ template formatODT() {
}
}
template outputODT() {
- import doc_reform.io_out;
+ import
+ doc_reform.io_out,
+ doc_reform.io_out.rgx,
+ doc_reform.io_out.rgx_xhtml;
import
std.digest.sha,
std.file,
@@ -654,7 +663,9 @@ template outputODT() {
doc_reform.io_out.xmls_css;
mixin InternalMarkup;
mixin spineRgxOut;
+ mixin spineRgxXHTML;
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
// mixin outputXmlODT;
@safe string odt_head(I)(I doc_matters) {
string _has_tables = format(q"┃