From 3668f9ec6b4dd096f2109557ca523b3d774ad6d1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 22 Oct 2019 19:56:58 -0400 Subject: minor --- org/meta_abstraction.org | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'org/meta_abstraction.org') diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index bff74a4..5da3795 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -4862,11 +4862,18 @@ string[string] flow_heading_matched_(CMM)( 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; -- cgit v1.2.3