diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-05-08 23:46:02 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-05-08 23:47:50 -0700 |
commit | 1c2951dfd9ee72e5270cb974a06098adb9178f89 (patch) | |
tree | 8bd06bd47431b6de127d19f401986dea1882fd72 /pandoc.hs | |
parent | 41a457a649cb981c703375181964314523546d72 (diff) |
EPUB writer: stylesheet changes. Closes #2040.
* Allow `--css` to be used to specify stylesheets.
* Deprecated `--epub-stylesheet` and made it a synoynym of
`--css`.
* If a code block with class "css" is given as contents of the
`stylesheet` metadata field, use its literal code as contents of
the epub stylesheet. Otherwise, treat it as a filename and
read the file.
* Note: `--css` and `stylesheet` in metadata are not compatible.
`stylesheet` takes precedence.
Diffstat (limited to 'pandoc.hs')
-rw-r--r-- | pandoc.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -689,8 +689,10 @@ options = , Option "" ["epub-stylesheet"] (ReqArg (\arg opt -> do - text <- UTF8.readFile arg - return opt { optEpubStylesheet = Just text }) + warn "--epub-stylesheet is deprecated. Use --css or stylesheet in metadata." + let newvars = optVariables opt ++ [("css",arg)] + return opt { optVariables = newvars, + optStandalone = True }) "FILENAME") "" -- "Path of epub.css" |