diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-03-27 18:13:27 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 25ac32b30c6ba98b32006677e2633befaa69483a (patch) | |
tree | b759654c0763f6ede950274e54aa775fc9e8d9f6 /src/sdp/output_xhtmls.d | |
parent | 0.13.7 tables ao and html output, poem html output (diff) |
output, move stuff about
Diffstat (limited to 'src/sdp/output_xhtmls.d')
-rw-r--r-- | src/sdp/output_xhtmls.d | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/sdp/output_xhtmls.d b/src/sdp/output_xhtmls.d index 971dd95..f371121 100644 --- a/src/sdp/output_xhtmls.d +++ b/src/sdp/output_xhtmls.d @@ -419,40 +419,6 @@ template outputXHTMLs() { ); return u; } - auto verse(O)( // using code from code block, review - auto return ref const O obj, - ) { - string _txt = obj.text; - _txt = (_txt) - .replaceAll(rgx.newline, "<br>\n") - .replaceAll(rgx.two_spaces, " " ~ " " ~ " " ~ " ") - .replaceAll(rgx.nbsp_and_space, " " ~ " "); - string o; - if (obj.obj_cite_number.empty) { - o = format(q"¶ <div class="substance"> - <p class="%s"> - %s - </p> - </div>¶", - obj.is_a, - _txt - ); - } else { - o = format(q"¶ <div class="substance"> - <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" id="%s"> - %s - </p> - </div>¶", - obj.obj_cite_number, - obj.obj_cite_number, - obj.is_a, - obj.obj_cite_number, - _txt - ); - } - return o; - } auto nugget(O)( auto return ref const O obj, ) { @@ -482,18 +448,38 @@ template outputXHTMLs() { } return o; } - auto endnote(O)( + auto verse(O)( // using code from code block, review auto return ref const O obj, ) { + string _txt = obj.text; + _txt = (_txt) + .replaceAll(rgx.newline, "<br>\n") + .replaceAll(rgx.two_spaces, " " ~ " " ~ " " ~ " ") + .replaceAll(rgx.nbsp_and_space, " " ~ " "); string o; - o = format(q"¶ <p class="%s" indent="h%si%s"> - %s - </p>¶", - obj.is_a, - obj.indent_hang, - obj.indent_base, - obj.text - ); + if (obj.obj_cite_number.empty) { + o = format(q"¶ <div class="substance"> + <p class="%s"> + %s + </p> + </div>¶", + obj.is_a, + _txt + ); + } else { + o = format(q"¶ <div class="substance"> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" id="%s"> + %s + </p> + </div>¶", + obj.obj_cite_number, + obj.obj_cite_number, + obj.is_a, + obj.obj_cite_number, + _txt + ); + } return o; } auto tablarize(O)( @@ -558,6 +544,20 @@ template outputXHTMLs() { ); return o; } + auto endnote(O)( + auto return ref const O obj, + ) { + string o; + o = format(q"¶ <p class="%s" indent="h%si%s"> + %s + </p>¶", + obj.is_a, + obj.indent_hang, + obj.indent_base, + obj.text + ); + return o; + } auto code(O)( auto return ref const O obj, ) { |