diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-11 22:25:57 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-11 23:15:30 -0800 |
commit | 91510a109f9284934fd5b6386fa23a5fc37b09bb (patch) | |
tree | 2cee03745727c1926ccfefcdf52e6c4b1a6603dc /src/pandoc.hs | |
parent | e8ad4ba43c7c187a5b6ee6025bc6039488d7f420 (diff) | |
download | pandoc-91510a109f9284934fd5b6386fa23a5fc37b09bb.tar.gz |
Improvements to --html5 support:
+ <nav> for TOC, <figure> for figures, type attribute in <ol>.
+ Don't add math javascript in html5.
+ Use style attributes instead of deprecated width, align.
+ html template: move <title> after <meta>.
Note: charset needs to be declared before title.
+ slidy and s5 templates: move <title> after <meta>.
+ html template: Added link to html5 shim for IE.
+ Make --html5 have an effect only for 'html' writer (not s5, slidy, epub).
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index 0e57f8eb7..2068f5fc6 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -41,7 +41,7 @@ import System.Exit ( exitWith, ExitCode (..) ) import System.FilePath import System.Console.GetOpt import Data.Char ( toLower ) -import Data.List ( intercalate, isSuffixOf ) +import Data.List ( intercalate, isSuffixOf, isPrefixOf ) import System.Directory ( getAppUserDataDirectory, doesFileExist ) import System.IO ( stdout, stderr ) import qualified Text.Pandoc.UTF8 as UTF8 @@ -780,7 +780,8 @@ main = do writerIdentifierPrefix = idPrefix, writerSourceDirectory = sourceDir, writerUserDataDir = datadir, - writerHtml5 = html5 } + writerHtml5 = html5 && + "html" `isPrefixOf` writerName' } when (isNonTextOutput writerName' && outputFile == "-") $ do UTF8.hPutStrLn stderr ("Error: Cannot write " ++ writerName ++ " output to stdout.\n" ++ |