Fix non-empty authors in HTML conversion

This commit is contained in:
orbifx 2022-11-06 12:29:49 +00:00
parent cc7515bfac
commit 671f5b5390
1 changed files with 6 additions and 6 deletions

View File

@ -58,7 +58,7 @@ let page htm conversion text =
let opt_kv key value = if String.length value > 0
then "<dt>" ^ key ^ "<dd>" ^ value else "" in
(* let author acc auth = sep_append acc Person.(auth.name ^ " ") in*)
let authors = (Person.Set.to_string text.authors ^ " ") in
let authors = Person.Set.to_string text.authors in
let keywords = str_set "keywords" text in
let header =
let time x = Printf.sprintf {|<time datetime="%s">%s</time>|}
@ -71,11 +71,11 @@ let page htm conversion text =
"<article><header><dl>"
^ opt_kv "Title:" text.title
^ opt_kv "Authors:" authors
^ opt_kv "Date: " (time (Date.listing text.date))
^ opt_kv "Series: " (str_set "series" text)
^ opt_kv "Topics: " (topic_links (set "topics" text))
^ opt_kv "Keywords: " keywords
^ opt_kv "Id: " text.id
^ opt_kv "Date:" (time (Date.listing text.date))
^ opt_kv "Series:" (str_set "series" text)
^ opt_kv "Topics:" (topic_links (set "topics" text))
^ opt_kv "Keywords:" keywords
^ opt_kv "Id:" text.id
^ {|</dl></header><pre style="white-space:pre-wrap">|} in
wrap conversion htm text.title ((T.of_string text.body header) ^ "</pre></article>")