template SiSUoutputXHTMLs() {
struct SDPoutputXHTMLs {
string _xhtml_anchor_tags(const(string[]) anchor_tags) {
string tags="";
if (anchor_tags.length > 0) {
foreach (tag; anchor_tags) {
if (!(tag.empty)) {
tags ~= "";
}
}
}
return tags;
}
auto scroll_head(Me)(
Me dochead_meta,
) {
debug(asserts){
static assert(is(typeof(dochead_meta) == string[string][string]));
}
string o;
o = format(q"¶
%s%s
¶",
dochead_meta["title"]["full"],
(dochead_meta["creator"]["author"].empty) ? "" : ", " ~ dochead_meta["creator"]["author"],
);
return o;
}
auto seg_head(Me)(
Me dochead_meta,
) {
debug(asserts){
static assert(is(typeof(dochead_meta) == string[string][string]));
}
string o;
o = format(q"¶
%s%s
¶",
dochead_meta["title"]["full"],
(dochead_meta["creator"]["author"].empty) ? "" : ", " ~ dochead_meta["creator"]["author"],
);
return o;
}
auto tail() {
string o;
o = format(q"¶
¶");
return o;
}
auto toc(O)(
auto ref const O obj,
) {
string o;
o = format(q"¶
%s
¶",
obj.is_a,
obj.indent_hang,
obj.indent_base,
obj.text
);
return o;
}
auto heading(O)(
auto ref const O obj,
) {
auto tags = _xhtml_anchor_tags(obj.anchor_tags);
string o;
if (obj.obj_cite_number.empty) {
o = format(q"¶