diff options
Diffstat (limited to 'src/sdp/ao_object_setter.d')
-rw-r--r-- | src/sdp/ao_object_setter.d | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sdp/ao_object_setter.d b/src/sdp/ao_object_setter.d index c48ddc0..844af9b 100644 --- a/src/sdp/ao_object_setter.d +++ b/src/sdp/ao_object_setter.d @@ -95,8 +95,28 @@ template ObjectSetter() { // object_set.node_structure.node = _node; return object_set; } + auto contents_toc( + in string is_a, + in string object, + in string attrib, + in int obj_cite_number, + in int[string] indent, + in bool bullet + ) { + ObjComposite object_set; + object_set.use = "content"; + object_set.of = "para"; + object_set.is_a = "toc"; + object_set.object = object.strip; + object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); + object_set.para_attrib.indent_start = to!int(indent["hang_position"]); + object_set.para_attrib.indent_rest = to!int(indent["base_position"]); + object_set.para_attrib.bullet = false; // bullet; + return object_set; + } auto contents_endnote( in string object, + in string tag, ) { auto m = (matchFirst(object, rgx.note_ref)); string notenumber = to!string(m.captures[1]); @@ -107,6 +127,7 @@ template ObjectSetter() { object_set.is_a = "endnote"; object_set.object = object.strip; object_set.obj_cite_number = ""; + object_set.anchor_tags ~= [ tag ]; object_set.para_attrib.indent_start = 0; object_set.para_attrib.indent_rest = 0; object_set.para_attrib.bullet = false; |