aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-14 18:27:06 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:42 +0100
commit6f8b967d98ea4270aa2492688fbcdfe8bad150b2 (patch)
tree96c4f2bcead8a4d24ab41aff9c318ff2a7637719 /pandoc.hs
parent3876b91448ad8d279f5d5a9d217e00cf4583e14b (diff)
downloadpandoc-6f8b967d98ea4270aa2492688fbcdfe8bad150b2.tar.gz
Removed readerSmart and the --smart option; added Ext_smart extension.
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs29
1 files changed, 10 insertions, 19 deletions
diff --git a/pandoc.hs b/pandoc.hs
index cd29428ec..371ad16e0 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -112,7 +112,6 @@ convertWithOpts opts args = do
, optSectionDivs = sectionDivs
, optIncremental = incremental
, optSelfContained = selfContained
- , optSmart = smart
, optOldDashes = oldDashes
, optHtml5 = html5
, optHtmlQTags = htmlQTags
@@ -212,10 +211,6 @@ convertWithOpts opts args = do
let conTeXtOutput = format == "context"
let html5Output = format == "html5"
- let laTeXInput = "latex" `isPrefixOf` readerName' ||
- "beamer" `isPrefixOf` readerName'
-
-
-- disabling the custom writer for now
writer <- if ".lua" `isSuffixOf` format
-- note: use non-lowercased version writerName
@@ -295,11 +290,15 @@ convertWithOpts opts args = do
uriFragment = "" }
_ -> Nothing
- let readerOpts = def{ readerSmart = if laTeXInput
- then texLigatures
- else smart || (texLigatures &&
- (laTeXOutput || conTeXtOutput))
- , readerStandalone = standalone'
+ {- TODO - smart is now an extension, but we should prob make
+ - texligatures one too...
+ let smartExt = if laTeXInput
+ then texLigatures
+ else smart || (texLigatures &&
+ (laTeXOutput || conTeXtOutput))
+ -}
+
+ let readerOpts = def{ readerStandalone = standalone'
, readerParseRaw = parseRaw
, readerColumns = columns
, readerTabStop = tabStop
@@ -547,7 +546,6 @@ data Opt = Opt
, optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
, optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
, optSelfContained :: Bool -- ^ Make HTML accessible offline
- , 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
@@ -613,7 +611,6 @@ defaultOpts = Opt
, optSectionDivs = False
, optIncremental = False
, optSelfContained = False
- , optSmart = False
, optOldDashes = False
, optHtml5 = False
, optHtmlQTags = False
@@ -692,15 +689,9 @@ options =
(\opt -> return opt { optParseRaw = True }))
"" -- "Parse untranslatable HTML codes and LaTeX environments as raw"
- , Option "S" ["smart"]
- (NoArg
- (\opt -> return opt { optSmart = True }))
- "" -- "Use smart quotes, dashes, and ellipses"
-
, Option "" ["old-dashes"]
(NoArg
- (\opt -> return opt { optSmart = True
- , optOldDashes = True }))
+ (\opt -> return opt { optOldDashes = True }))
"" -- "Use smart quotes, dashes, and ellipses"
, Option "" ["base-header-level"]