aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:15:42 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:15:42 +0000
commit7baa79597e1306eeed0313ffafd240b4df5080bb (patch)
treeeebdcb670876304bd3fb588696084f8357832208 /src
parent5ba6c0911cb44c3a095bc3cedc51e4afa79c6b30 (diff)
downloadpandoc-7baa79597e1306eeed0313ffafd240b4df5080bb.tar.gz
Use $for$ for --css option in HTML writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1721 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
-rw-r--r--src/pandoc.hs9
2 files changed, 4 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index cae2bb021..a5b403a9b 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -38,7 +38,7 @@ import Text.Pandoc.Highlighting ( highlightHtml )
import Text.Pandoc.XML (stripTags)
import Numeric ( showHex )
import Data.Char ( ord, toLower )
-import Data.List ( isPrefixOf, intersperse, intercalate )
+import Data.List ( isPrefixOf, intersperse )
import Data.Maybe ( catMaybes )
import Control.Monad.State
import Text.XHtml.Transitional hiding ( stringToHtml )
@@ -155,8 +155,8 @@ inTemplate opts tit auths date toc body' newvars =
, ("pagetitle", topTitle')
, ("toc", renderHtmlFragment toc)
, ("title", renderHtmlFragment tit)
- , ("authors", intercalate "; " authors)
- , ("date", date') ]
+ , ("date", date') ] ++
+ [ ("author", a) | a <- authors ]
in renderTemplate context $ writerTemplate opts
-- | Like Text.XHtml's identifier, but adds the writerIdentifierPrefix
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 18ea40be8..8b626c2c2 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -358,14 +358,7 @@ options =
, Option "c" ["css"]
(ReqArg
(\arg opt -> do
- let text' = "<link rel=\"stylesheet\" href=\"" ++ arg ++
- "\" type=\"text/css\" />\n"
- let oldvars = optVariables opt
- let newvars = case lookup "css" oldvars of
- Nothing -> ("css", text') : oldvars
- Just b -> ("css", b ++ text') :
- filter ((/= "css") . fst)
- oldvars
+ let newvars = ("css",arg) : optVariables opt
return opt { optVariables = newvars,
optStandalone = True })
"URL")