Changed '--smartypants' to '--smart' and adjusted documentation

and symbols accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@224 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2006-12-18 22:02:39 +00:00
parent cd4a035a75
commit a8bbd950e5
4 changed files with 12 additions and 12 deletions

2
README
View file

@ -232,7 +232,7 @@ at the beginning of the title that appears in the HTML header (but not
in the title as it appears at the beginning of the HTML body). (See
below on Titles.)
`-S` or `--smartypants` causes `pandoc` to produce typographically
`-S` or `--smart` causes `pandoc` to produce typographically
correct HTML output, along the lines of John Gruber's [Smartypants].
Straight quotes are converted to curly quotes, `---` to dashes, and
`...` to ellipses.

View file

@ -73,7 +73,7 @@ data Opt = Opt
, optTitlePrefix :: String -- ^ Optional prefix for HTML title
, optNumberSections :: Bool -- ^ If @True@, number sections in LaTeX
, optIncremental :: Bool -- ^ If @True@, show lists incrementally in S5
, optSmartypants :: Bool -- ^ If @True@, use smart quotes, dashes, ...
, optSmart :: Bool -- ^ If @True@, use smart quotes, dashes, ...
, optASCIIMathML :: Bool -- ^ If @True@, use ASCIIMathML in HTML or S5
}
@ -95,7 +95,7 @@ startOpt = Opt
, optTitlePrefix = ""
, optNumberSections = False
, optIncremental = False
, optSmartypants = False
, optSmart = False
, optASCIIMathML = False
}
@ -157,10 +157,10 @@ options =
(\opt -> return opt { optParseRaw = True }))
"Parse untranslatable HTML codes and LaTeX environments as raw"
, Option "S" ["smartypants"]
, Option "S" ["smart"]
(NoArg
(\opt -> return opt { optSmartypants = True }))
"Use smartypants for html output"
(\opt -> return opt { optSmart = True }))
"Use smart quotes, dashes, and ellipses in HTML output"
, Option "m" ["asciimathml"]
(NoArg
@ -255,7 +255,7 @@ main = do
, optTitlePrefix = titlePrefix
, optNumberSections = numberSections
, optIncremental = incremental
, optSmartypants = smartypants
, optSmart = smart
, optASCIIMathML = asciiMathML
} = opts
@ -278,7 +278,7 @@ main = do
let writerOptions = WriterOptions { writerStandalone = standalone,
writerHeader = header,
writerTitlePrefix = titlePrefix,
writerSmartypants = smartypants,
writerSmart = smart,
writerTabStop = tabStop,
writerS5 = writingS5,
writerIncremental = incremental,

View file

@ -276,7 +276,7 @@ data WriterOptions = WriterOptions
, writerHeader :: String -- ^ Header for the document
, writerIncludeBefore :: String -- ^ String to include before the document body
, writerIncludeAfter :: String -- ^ String to include after the document body
, writerSmartypants :: Bool -- ^ If @True@, use smart quotes, dashes, and ellipses
, writerSmart :: Bool -- ^ If @True@, use smart quotes, dashes, and ellipses
, writerS5 :: Bool -- ^ @True@ if we're writing S5 instead of normal HTML
, writerIncremental :: Bool -- ^ If @True@, display S5 lists incrementally
, writerNumberSections :: Bool -- ^ If @True@, number sections in LaTeX

View file

@ -51,7 +51,7 @@ obfuscateChar char = let num = ord char in
stringToHtml :: String -> String
stringToHtml str = escapePreservingRegex stringToHtmlString (mkRegex "\"|(&[[:alnum:]]*;)") str
-- | Escape string as in 'stringToHtml' but add smartypants filter.
-- | Escape string as in 'stringToHtml' but add smart typography filter.
stringToSmartHtml :: String -> String
stringToSmartHtml =
let escapeDoubleQuotes =
@ -157,7 +157,7 @@ listItemToHtml options list = "<li>" ++ (concatMap (blockToHtml options) list) +
inlineListToHtml :: WriterOptions -> [Inline] -> String
inlineListToHtml options lst =
-- consolidate adjacent Str and Space elements for more intelligent
-- smartypants filtering
-- smart typography filtering
let lst' = consolidateList lst in
concatMap (inlineToHtml options) lst'
@ -166,7 +166,7 @@ inlineToHtml :: WriterOptions -> Inline -> String
inlineToHtml options (Emph lst) = "<em>" ++ (inlineListToHtml options lst) ++ "</em>"
inlineToHtml options (Strong lst) = "<strong>" ++ (inlineListToHtml options lst) ++ "</strong>"
inlineToHtml options (Code str) = "<code>" ++ (codeStringToHtml str) ++ "</code>"
inlineToHtml options (Str str) = if (writerSmartypants options) then
inlineToHtml options (Str str) = if (writerSmart options) then
stringToSmartHtml str
else
stringToHtml str