git.iko.soy/typeable/pandoc
on master help sign in
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

commita8bbd950e526abb69262fb7186ced583885c6ac8 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 18 Dec 2006, 22:02 (20 years ago) parentcd4a035
4 files changed+12−12
README+1−1 src/Main.hs+7−7 src/Text/Pandoc/Shared.hs+1−1 src/Text/Pandoc/Writers/HTML.hs+3−3
README+1−1
@@ -232,7 +232,7 @@ at the beginning of the title that appears in the HTML header (but not
232232in the title as it appears at the beginning of the HTML body). (See
233233below on Titles.)
234234
235−`-S` or `--smartypants` causes `pandoc` to produce typographically
235+`-S` or `--smart` causes `pandoc` to produce typographically
236236correct HTML output, along the lines of John Gruber's [Smartypants].
237237Straight quotes are converted to curly quotes, `---` to dashes, and
238238`...` to ellipses.
src/Main.hs+7−7
@@ -73,7 +73,7 @@ data Opt = Opt
7373 , optTitlePrefix :: String -- ^ Optional prefix for HTML title
7474 , optNumberSections :: Bool -- ^ If @True@, number sections in LaTeX
7575 , optIncremental :: Bool -- ^ If @True@, show lists incrementally in S5
76− , optSmartypants :: Bool -- ^ If @True@, use smart quotes, dashes, ...
76+ , optSmart :: Bool -- ^ If @True@, use smart quotes, dashes, ...
7777 , optASCIIMathML :: Bool -- ^ If @True@, use ASCIIMathML in HTML or S5
7878 }
7979
@@ -95,7 +95,7 @@ startOpt = Opt
9595 , optTitlePrefix = ""
9696 , optNumberSections = False
9797 , optIncremental = False
98− , optSmartypants = False
98+ , optSmart = False
9999 , optASCIIMathML = False
100100 }
101101
@@ -157,10 +157,10 @@ options =
157157 (\opt -> return opt { optParseRaw = True }))
158158 "Parse untranslatable HTML codes and LaTeX environments as raw"
159159
160− , Option "S" ["smartypants"]
160+ , Option "S" ["smart"]
161161 (NoArg
162− (\opt -> return opt { optSmartypants = True }))
163− "Use smartypants for html output"
162+ (\opt -> return opt { optSmart = True }))
163+ "Use smart quotes, dashes, and ellipses in HTML output"
164164
165165 , Option "m" ["asciimathml"]
166166 (NoArg
@@ -255,7 +255,7 @@ main = do
255255 , optTitlePrefix = titlePrefix
256256 , optNumberSections = numberSections
257257 , optIncremental = incremental
258− , optSmartypants = smartypants
258+ , optSmart = smart
259259 , optASCIIMathML = asciiMathML
260260 } = opts
261261
@@ -278,7 +278,7 @@ main = do
278278 let writerOptions = WriterOptions { writerStandalone = standalone,
279279 writerHeader = header,
280280 writerTitlePrefix = titlePrefix,
281− writerSmartypants = smartypants,
281+ writerSmart = smart,
282282 writerTabStop = tabStop,
283283 writerS5 = writingS5,
284284 writerIncremental = incremental,
src/Text/Pandoc/Shared.hs+1−1
@@ -276,7 +276,7 @@ data WriterOptions = WriterOptions
276276 , writerHeader :: String -- ^ Header for the document
277277 , writerIncludeBefore :: String -- ^ String to include before the document body
278278 , writerIncludeAfter :: String -- ^ String to include after the document body
279− , writerSmartypants :: Bool -- ^ If @True@, use smart quotes, dashes, and ellipses
279+ , writerSmart :: Bool -- ^ If @True@, use smart quotes, dashes, and ellipses
280280 , writerS5 :: Bool -- ^ @True@ if we're writing S5 instead of normal HTML
281281 , writerIncremental :: Bool -- ^ If @True@, display S5 lists incrementally
282282 , writerNumberSections :: Bool -- ^ If @True@, number sections in LaTeX
src/Text/Pandoc/Writers/HTML.hs+3−3
@@ -51,7 +51,7 @@ obfuscateChar char = let num = ord char in
5151stringToHtml :: String -> String
5252stringToHtml str = escapePreservingRegex stringToHtmlString (mkRegex "\"|(&[[:alnum:]]*;)") str
5353
54−-- | Escape string as in 'stringToHtml' but add smartypants filter.
54+-- | Escape string as in 'stringToHtml' but add smart typography filter.
5555stringToSmartHtml :: String -> String
5656stringToSmartHtml =
5757 let escapeDoubleQuotes =
@@ -157,7 +157,7 @@ listItemToHtml options list = "<li>" ++ (concatMap (blockToHtml options) list) +
157157inlineListToHtml :: WriterOptions -> [Inline] -> String
158158inlineListToHtml options lst =
159159 -- consolidate adjacent Str and Space elements for more intelligent
160− -- smartypants filtering
160+ -- smart typography filtering
161161 let lst' = consolidateList lst in
162162 concatMap (inlineToHtml options) lst'
163163
@@ -166,7 +166,7 @@ inlineToHtml :: WriterOptions -> Inline -> String
166166inlineToHtml options (Emph lst) = "<em>" ++ (inlineListToHtml options lst) ++ "</em>"
167167inlineToHtml options (Strong lst) = "<strong>" ++ (inlineListToHtml options lst) ++ "</strong>"
168168inlineToHtml options (Code str) = "<code>" ++ (codeStringToHtml str) ++ "</code>"
169−inlineToHtml options (Str str) = if (writerSmartypants options) then
169+inlineToHtml options (Str str) = if (writerSmart options) then
170170 stringToSmartHtml str
171171 else
172172 stringToHtml str