From a465c4f659b5bd2b67f1a00f64a70eb535ba6ef8 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 29 Dec 2007 21:11:33 +0000 Subject: 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 --- Text/Pandoc/Writers/HTML.hs | 6 ++++-- 1 file 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"] +++ -- cgit v1.2.3