aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/metadoc_from_src.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-10-22 19:56:58 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-11-19 16:55:29 -0500
commit3668f9ec6b4dd096f2109557ca523b3d774ad6d1 (patch)
tree5412fc865db231d690c095f894e7c0d2aee7f55b /src/doc_reform/meta/metadoc_from_src.d
parentcosmetic (diff)
minor
Diffstat (limited to 'src/doc_reform/meta/metadoc_from_src.d')
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index f5e0b81..4eb7771 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -3855,11 +3855,18 @@ template DocReformDocAbstraction() {
assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels
switch (an_object["lev"]) {
case "A": // Title set
- an_object[an_object_key]=(an_object[an_object_key])
- .replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ ","))
- .replaceFirst(rgx.variable_doc_author,
- conf_make_meta.meta.creator_author);
+ if (an_object[an_object_key].match(rgx.variable_doc_title)
+ && an_object[an_object_key].match(rgx.variable_doc_author)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ (conf_make_meta.meta.title_full ~ ", "))
+ .replaceFirst(rgx.variable_doc_author,
+ conf_make_meta.meta.creator_author);
+ } else if (an_object[an_object_key].match(rgx.variable_doc_title)) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title,
+ conf_make_meta.meta.title_full);
+ }
collapsed_lev["h0"] = 0;
an_object["lev_collapsed_number"]
= collapsed_lev["h0"].to!string;