Use $for$ for --css option in HTML writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1721 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
5ba6c0911c
commit
7baa79597e
3 changed files with 10 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="author" content="$authors$" />
|
||||
$for(author)$
|
||||
<meta name="author" content="$author$" />
|
||||
$endfor$
|
||||
<meta name="date" content="$date$" />
|
||||
$if(highlighting)$
|
||||
<style type="text/css">
|
||||
|
@ -28,6 +30,9 @@ $if(highlighting)$
|
|||
pre.sourceCode span.Error { color: red; font-weight: bold; }
|
||||
</style>
|
||||
$endif$
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$" type="text/css" />
|
||||
$endfor$
|
||||
$if(header-includes)$
|
||||
$header-includes$
|
||||
$endif$
|
||||
|
|
Loading…
Add table
Reference in a new issue