diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-01-15 18:50:36 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-01-15 18:50:36 -0800 |
commit | eebed6bc48c2e1b8c2da2e5b198e0164f76c0ab5 (patch) | |
tree | 4117fce2210b2fe9e10d2413d0d6177946356248 /pandoc.hs | |
parent | 93b373d4eb39c0ec13a563ee48ec2e0c9adf63a2 (diff) |
Added `writerHtmlQTags` and `--html-q-tags` option.
The previous default was to use `<q>` tags in HTML5.
But `<q>` tags are also valid HTML4, and they are not very
robust in HTML5. Some user agents don't support them,
and some CSS resets prevent pandoc's quotes CSS from working
properly (e.g. bootstrap). It seems a better default just
to insert quote characters, but the option is provided for
those who have gotten used to using `<q>` tags.
Diffstat (limited to 'pandoc.hs')
-rw-r--r-- | pandoc.hs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -105,6 +105,7 @@ data Opt = Opt , optSmart :: Bool -- ^ Use smart typography , optOldDashes :: Bool -- ^ Parse dashes like pandoc <=1.8.2.1 , optHtml5 :: Bool -- ^ Produce HTML5 in HTML + , optHtmlQTags :: Bool -- ^ Use <q> tags in HTML , optHighlight :: Bool -- ^ Highlight source code , optHighlightStyle :: Style -- ^ Style to use for highlighted code , optChapters :: Bool -- ^ Use chapter for top-level sects @@ -159,6 +160,7 @@ defaultOpts = Opt , optSmart = False , optOldDashes = False , optHtml5 = False + , optHtmlQTags = False , optHighlight = True , optHighlightStyle = pygments , optChapters = False @@ -431,6 +433,12 @@ options = return opt { optHtml5 = True })) "" -- "Produce HTML5 in HTML output" + , Option "" ["html-q-tags"] + (NoArg + (\opt -> do + return opt { optHtmlQTags = True })) + "" -- "Use <q> tags for quotes in HTML" + , Option "" ["ascii"] (NoArg (\opt -> return opt { optAscii = True })) @@ -816,6 +824,7 @@ main = do , optSmart = smart , optOldDashes = oldDashes , optHtml5 = html5 + , optHtmlQTags = htmlQTags , optHighlight = highlight , optHighlightStyle = highlightStyle , optChapters = chapters @@ -1009,6 +1018,7 @@ main = do writerSourceDirectory = sourceDir, writerUserDataDir = datadir, writerHtml5 = html5, + writerHtmlQTags = htmlQTags, writerChapters = chapters, writerListings = listings, writerBeamer = False, |