Fix non-empty authors in HTML conversion

git-svn-id: file:///srv/svn/repo/kosuzu/trunk@24 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
fox
2022-11-06 12:48:40 +00:00
parent d86b575d97
commit 5fd7b2d389

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>")