aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-29 21:11:33 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-29 21:11:33 +0000
commita465c4f659b5bd2b67f1a00f64a70eb535ba6ef8 (patch)
tree66b9442777f3aa05692931a90903c9d88e5c0802 /Text
parent5e65598b9e7dd980063312c4375441f31b9d9512 (diff)
downloadpandoc-a465c4f659b5bd2b67f1a00f64a70eb535ba6ef8.tar.gz
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
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/Writers/HTML.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Text/Pandoc/Writers/HTML.hs b/Text/Pandoc/Writers/HTML.hs
index 0061420d0..b35edde07 100644
--- a/Text/Pandoc/Writers/HTML.hs
+++ b/Text/Pandoc/Writers/HTML.hs
@@ -71,8 +71,10 @@ writeHtml opts (Pandoc (Meta tit authors date) blocks) =
let titlePrefix = writerTitlePrefix opts
topTitle = evalState (inlineListToHtml opts tit) defaultWriterState
topTitle' = if null titlePrefix
- then topTitle
- else titlePrefix +++ " - " +++ topTitle
+ then topTitle
+ else if null tit
+ then stringToHtml titlePrefix
+ else titlePrefix +++ " - " +++ topTitle
metadata = thetitle topTitle' +++
meta ! [httpequiv "Content-Type",
content "text/html; charset=UTF-8"] +++