aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_object_setter.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-09-06 20:58:58 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commitff78ec1fffc029a6947528f4b546dde57a633549 (patch)
tree7b77ccd936719da2538ade75d3bdeb4a8c490a59 /src/sdp/ao_object_setter.d
parentnaming of para indent attributes (diff)
0.6.8 work on heading & anchor tag attributes, re-fix header_make headings
Diffstat (limited to 'src/sdp/ao_object_setter.d')
-rw-r--r--src/sdp/ao_object_setter.d34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/sdp/ao_object_setter.d b/src/sdp/ao_object_setter.d
index bb7a17e..0d8107c 100644
--- a/src/sdp/ao_object_setter.d
+++ b/src/sdp/ao_object_setter.d
@@ -15,6 +15,7 @@ template ObjectSetter() {
bool bullet = false;
}
struct BlockAttrib {
+ string syntax = "";
}
struct Comment {
// no .attrib and no .obj_cite_number
@@ -89,6 +90,23 @@ template ObjectSetter() {
// object_set.node_structure.node = node;
return object_set;
}
+ auto contents_endnote(
+ in string object,
+ ) {
+ auto m = (matchFirst(object, rgx.note_ref));
+ string notenumber = to!string(m.captures[1]);
+ string anchor_tag = "note_" ~ notenumber;
+ ObjComposite object_set;
+ object_set.use = "content";
+ object_set.of = "para";
+ object_set.is_a = "endnote";
+ object_set.object = object.strip;
+ object_set.obj_cite_number = "";
+ object_set.para_attrib.indent_start = 0;
+ object_set.para_attrib.indent_rest = 0;
+ object_set.para_attrib.bullet = false;
+ return object_set;
+ }
auto contents_block(
in string type,
in string object,
@@ -104,6 +122,22 @@ template ObjectSetter() {
// object_set.node_structure.node = node;
return object_set;
}
+ auto contents_block_code(
+ in string type,
+ in string object,
+ in string attrib_language_syntax,
+ in int obj_cite_number
+ ) {
+ ObjComposite object_set;
+ object_set.use = "content";
+ object_set.of = "block";
+ object_set.is_a = type;
+ object_set.block_attrib.syntax = attrib_language_syntax;
+ object_set.object = object;
+ object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
+ // object_set.node_structure.node = node;
+ return object_set;
+ }
auto contents_block_obj_cite_number_string(
in string type,
in string object,