aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/output.org')
-rw-r--r--org/output.org46
1 files changed, 44 insertions, 2 deletions
diff --git a/org/output.org b/org/output.org
index 8ad43d9..bda3325 100644
--- a/org/output.org
+++ b/org/output.org
@@ -272,6 +272,40 @@ template outputXHTMLs() {
#+END_SRC
**** misc
+***** special characters
+
+#+name: xhtml_format_objects
+#+BEGIN_SRC d
+string special_characters(string _txt){
+ _txt = (_txt)
+ .replaceAll(rgx.xhtml_ampersand, "&")
+ .replaceAll(rgx.xhtml_less_than, "<")
+ .replaceAll(rgx.xhtml_greater_than, ">")
+ .replaceAll(rgx.xhtml_line_break, "<br />");
+ return _txt;
+}
+#+END_SRC
+
+***** font_face
+
+#+name: xhtml_format_objects
+#+BEGIN_SRC d
+string font_face(string _txt){
+ _txt = (_txt)
+ .replaceAll(rgx.inline_emphasis, ("<emph>$1</emph>"))
+ .replaceAll(rgx.inline_bold, ("<b>$1</b>"))
+ .replaceAll(rgx.inline_underscore, ("<u>$1</u>"))
+ .replaceAll(rgx.inline_italics, ("<i>$1</i>"))
+ .replaceAll(rgx.inline_superscript, ("<sup>$1</sup>"))
+ .replaceAll(rgx.inline_subscript, ("<sub>$1</sub>"))
+ .replaceAll(rgx.inline_strike, ("<del>$1</del>"))
+ .replaceAll(rgx.inline_insert, ("<ins>$1</ins>"))
+ .replaceAll(rgx.inline_mono, ("<tt>$1</tt>"))
+ .replaceAll(rgx.inline_cite, ("<cite>$1</cite>"));
+ return _txt;
+}
+#+END_SRC
+
***** anchor tags
#+name: xhtml_format_objects
@@ -536,6 +570,7 @@ auto inline_markup_scroll(O)(
string _suffix = ".html",
) {
string _txt = obj.text;
+ _txt = special_characters(_txt);
_txt = inline_links(obj, _txt, _suffix, "scroll");
_txt = inline_notes_scroll(obj, _txt);
return _txt;
@@ -551,6 +586,7 @@ auto inline_markup_seg(O)(
string _suffix = ".html",
) {
string _txt = obj.text;
+ _txt = special_characters(_txt);
_txt = inline_links(obj, _txt, _suffix, "seg");
auto t = inline_notes_seg(obj, _txt);
return t;
@@ -671,7 +707,9 @@ auto para(O)(
string _txt,
) {
auto tags = _xhtml_anchor_tags(obj.anchor_tags);
+ _txt = font_face(_txt);
string o;
+ _txt = (obj.bullet) ? ("●&nbsp;&nbsp" ~ _txt) : _txt;
if (obj.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<p class="%s" indent="h%si%s">%s
@@ -802,6 +840,10 @@ auto endnote(O)(
auto code(O)(
auto return ref const O obj,
) {
+ string _txt = obj.text;
+ _txt = (_txt)
+ .replaceAll(rgx.newline, "<br>\n")
+ .replaceAll(rgx.nbsp_char, "&nbsp;");
string o;
if (obj.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
@@ -810,7 +852,7 @@ auto endnote(O)(
</p>
</div>¶",
obj.is_a,
- obj.text
+ _txt
);
} else {
o = format(q"¶ <div class="substance">
@@ -823,7 +865,7 @@ auto endnote(O)(
obj.obj_cite_number,
obj.is_a,
obj.obj_cite_number,
- obj.text
+ _txt
);
}
return o;