aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/metaverse.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-01-25 14:36:59 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2022-01-25 20:58:41 -0500
commit3c2da303eed87e506533c738c1bcfda154944790 (patch)
tree0e5125110e58ef64ce13a980b281328f325740c6 /org/metaverse.org
parentmetadata, topic register to json removed, unused (diff)
doc presentation, add option to include date with title and author
Diffstat (limited to 'org/metaverse.org')
-rw-r--r--org/metaverse.org28
1 files changed, 25 insertions, 3 deletions
diff --git a/org/metaverse.org b/org/metaverse.org
index 421bd2b..f3e7425 100644
--- a/org/metaverse.org
+++ b/org/metaverse.org
@@ -5151,6 +5151,7 @@ if (pith["block_is"] == eN.blk_is.quote) {
return ref CMM conf_make_meta,
) {
static auto rgx = RgxI();
+ static auto mkup = InlineMarkup();
if (auto m = line.match(rgx.headings)) { /+ heading match +/
++line_occur["heading"];
pith["txt_is"] = eN.txt_is.heading;
@@ -5162,11 +5163,32 @@ if (pith["block_is"] == eN.blk_is.quote) {
assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels
switch (an_object["lev"]) {
case "A": // Title set
- if (an_object[an_object_key].match(rgx.variable_doc_title)
- && an_object[an_object_key].match(rgx.variable_doc_author)) {
+ if ((an_object[an_object_key].match(rgx.variable_doc_title_author_date))
+ || (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].match(rgx.variable_doc_date))) {
+ an_object[an_object_key] = an_object[an_object_key]
+ .replaceFirst(rgx.variable_doc_title_author_date,
+ (conf_make_meta.meta.title_full
+ ~ mkup.br_nl
+ ~ conf_make_meta.meta.creator_author
+ ~ " (" ~ (conf_make_meta.meta.date_published.replaceFirst(regex(r"(?:-00)+"),"")) ~ ")"))
+ .replaceFirst(rgx.variable_doc_title,
+ (conf_make_meta.meta.title_full ~ mkup.br_nl))
+ .replaceFirst(rgx.variable_doc_author,
+ conf_make_meta.meta.creator_author)
+ .replaceFirst(rgx.variable_doc_date,
+ " (" ~ (conf_make_meta.meta.date_published.replaceFirst(regex(r"(?:-00)+"),"")) ~ ")");
+ } else if ((an_object[an_object_key].match(rgx.variable_doc_title_author))
+ || (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_author_date,
+ (conf_make_meta.meta.title_full
+ ~ mkup.br_nl
+ ~ conf_make_meta.meta.creator_author))
.replaceFirst(rgx.variable_doc_title,
- (conf_make_meta.meta.title_full ~ ", "))
+ (conf_make_meta.meta.title_full ~ mkup.br_nl))
.replaceFirst(rgx.variable_doc_author,
conf_make_meta.meta.creator_author);
} else if (an_object[an_object_key].match(rgx.variable_doc_title)) {