aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_odt.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/out_odt.org')
-rw-r--r--org/out_odt.org18
1 files changed, 13 insertions, 5 deletions
diff --git a/org/out_odt.org b/org/out_odt.org
index 23afc03..c9d36da 100644
--- a/org/out_odt.org
+++ b/org/out_odt.org
@@ -54,8 +54,10 @@ module doc_reform.io_out.odt;
template formatODT() {
<<output_imports>>
mixin spineRgxOut;
+ mixin spineRgxXHTML;
struct formatODT {
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
<<odt_format_objects_0>>
<<odt_format_objects_1>>
<<odt_format_objects_2>>
@@ -87,7 +89,9 @@ template outputODT() {
<<output_imports>>
mixin InternalMarkup;
mixin spineRgxOut;
+ mixin spineRgxXHTML;
static auto rgx = RgxO();
+ static auto rgx_xhtml = RgxXHTML();
// mixin outputXmlODT;
<<output_odt_variable_content_xml_0>>
<<output_odt_variable_content_xml_1>>
@@ -201,6 +205,7 @@ template outputODT() {
#+BEGIN_SRC d
@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">
@@ -394,10 +399,10 @@ template outputODT() {
#+BEGIN_SRC d
@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;
}
@@ -1021,7 +1026,10 @@ void outputODT(D,I)(
#+NAME: output_imports
#+BEGIN_SRC d
-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,