Changed handling of titles in HTML writer so you don't get "titleprefix - "

followed by nothing.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1159 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-12-29 21:11:33 +00:00
parent 5e65598b9e
commit a465c4f659

View file

@ -71,8 +71,10 @@ writeHtml opts (Pandoc (Meta tit authors date) blocks) =
let titlePrefix = writerTitlePrefix opts let titlePrefix = writerTitlePrefix opts
topTitle = evalState (inlineListToHtml opts tit) defaultWriterState topTitle = evalState (inlineListToHtml opts tit) defaultWriterState
topTitle' = if null titlePrefix topTitle' = if null titlePrefix
then topTitle then topTitle
else titlePrefix +++ " - " +++ topTitle else if null tit
then stringToHtml titlePrefix
else titlePrefix +++ " - " +++ topTitle
metadata = thetitle topTitle' +++ metadata = thetitle topTitle' +++
meta ! [httpequiv "Content-Type", meta ! [httpequiv "Content-Type",
content "text/html; charset=UTF-8"] +++ content "text/html; charset=UTF-8"] +++