diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2018-11-08 22:31:33 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-04-10 15:14:15 -0400 |
commit | da510342e09ec27e8775ea6613f3d7df3327869b (patch) | |
tree | 40886c957747798c7c61914eefed0f1ca254fa28 /src/doc_reform/output/xmls.d | |
parent | 0.3.1 internal links, anchor tags & segment associations, toc (diff) |
xmls more on anchor tags, scroll fix where no ocn
Diffstat (limited to 'src/doc_reform/output/xmls.d')
-rw-r--r-- | src/doc_reform/output/xmls.d | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d index b69d1a7..6f1f925 100644 --- a/src/doc_reform/output/xmls.d +++ b/src/doc_reform/output/xmls.d @@ -623,22 +623,7 @@ template outputXHTMLs() { heading_lev_anchor_tag = (obj.tags.heading_lev_anchor_tag.empty) ? "" : "<a name=\"" ~ obj.tags.heading_lev_anchor_tag ~ "\"></a>"; - if (obj.metainfo.object_number.empty) { - o = format(q"¶%s - <div class="substance"> - <h%s class="%s">%s%s - %s - </h%s> - </div>¶", - _horizontal_rule, - obj.metainfo.heading_lev_markup, - obj.metainfo.is_a, - tags, - heading_lev_anchor_tag, - _txt, - obj.metainfo.heading_lev_markup, - ); - } else { + if (!(obj.metainfo.identifier.empty)) { o = format(q"¶%s <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> @@ -647,17 +632,32 @@ template outputXHTMLs() { </h%s> </div>¶", _horizontal_rule, - obj.metainfo.object_number, - obj.metainfo.object_number, + obj.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.heading_lev_markup, obj.metainfo.is_a, - obj.metainfo.object_number, - obj.metainfo.object_number, + obj.metainfo.identifier, + obj.metainfo.identifier, tags, heading_lev_anchor_tag, _txt, obj.metainfo.heading_lev_markup, ); + } else { + o = format(q"¶%s + <div class="substance"> + <h%s class="%s">%s%s + %s + </h%s> + </div>¶", + _horizontal_rule, + obj.metainfo.heading_lev_markup, + obj.metainfo.is_a, + tags, + heading_lev_anchor_tag, + _txt, + obj.metainfo.heading_lev_markup, + ); } return o; } @@ -700,31 +700,31 @@ template outputXHTMLs() { _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; _txt = _txt.replaceFirst(rgx.inline_link_anchor, "<a name=\"$1\"></a>"); - if (obj.metainfo.object_number.empty) { + if (!(obj.metainfo.identifier.empty)) { o = format(q"¶ <div class="substance"> - <p class="%s" indent="h%si%s">%s + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" indent="h%si%s" id="%s">%s %s </p> </div>¶", + obj.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, + obj.metainfo.identifier, tags, _txt ); } else { o = format(q"¶ <div class="substance"> - <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" indent="h%si%s" id="%s">%s + <p class="%s" indent="h%si%s">%s %s </p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, - obj.metainfo.object_number, tags, _txt ); @@ -766,26 +766,26 @@ template outputXHTMLs() { ) { _txt = font_face(_txt); string o; - if (obj.metainfo.object_number.empty) { + if (!(obj.metainfo.identifier.empty)) { o = format(q"¶ <div class="substance"> - <p class="%s"> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" id="%s"> %s </p> </div>¶", + obj.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, + obj.metainfo.identifier, _txt ); } else { o = format(q"¶ <div class="substance"> - <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" id="%s"> + <p class="%s"> %s </p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, - obj.metainfo.object_number, _txt ); } @@ -826,26 +826,26 @@ template outputXHTMLs() { ) { _txt = font_face(_txt); string o; - if (obj.metainfo.object_number.empty) { + if (!(obj.metainfo.identifier.empty)) { o = format(q"¶ <div class="substance"> - <p class="%s"> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" id="%s"> %s </p> </div>¶", + obj.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, + obj.metainfo.identifier, _txt ); } else { o = format(q"¶ <div class="substance"> - <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" id="%s"> + <p class="%s"> %s </p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, - obj.metainfo.object_number, _txt ); } @@ -887,22 +887,22 @@ template outputXHTMLs() { ) { _txt = font_face(_txt); string o; - if (obj.metainfo.object_number.empty) { + if (!(obj.metainfo.identifier.empty)) { o = format(q"¶ <div class="substance"> - <p class="%s">%s</p> + <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> + <p class="%s" id="%s">%s</p> </div>¶", + obj.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, + obj.metainfo.identifier, _txt.stripRight ); } 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> + <p class="%s">%s</p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, - obj.metainfo.object_number, _txt.stripRight ); } @@ -944,22 +944,22 @@ template outputXHTMLs() { ) { _txt = font_face(_txt); string o; - if (obj.metainfo.object_number.empty) { - o = format(q"¶ <div class="substance"> - <p class="%s">%s</p> + if (!(obj.metainfo.identifier.empty)) { + 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.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, + obj.metainfo.identifier, _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> + <p class="%s">%s</p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, - obj.metainfo.object_number, _txt ); } @@ -1080,22 +1080,22 @@ template outputXHTMLs() { string _txt, ) { string o; - if (obj.metainfo.object_number.empty) { - o = format(q"¶ <div class="substance"> - <p class="%s">%s</p> + if (!(obj.metainfo.identifier.empty)) { + 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.metainfo.identifier, + (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier, obj.metainfo.is_a, + obj.metainfo.identifier, _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> + <p class="%s">%s</p> </div>¶", - obj.metainfo.object_number, - obj.metainfo.object_number, obj.metainfo.is_a, - obj.metainfo.object_number, _txt ); } |