git.iko.soy/typeable/pandoc
on master help sign in
Changed --default-code-classes -> --indented-code-classes.

Also changed stateDefaultCodeClasses -> stateIndentedCodeClasses. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1643 788f1e2b-df1e-0410-8736-df70ead52e1b

commiteb5550a6e4daf77754fb55d1867f718179182bdb authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 5 Dec 2009, 04:46 (17 years ago) parentc4915ea
5 files changed+12−11
README+1−1 man/man1/pandoc.1.md+1−1 src/Text/Pandoc/Readers/Markdown.hs+2−1 src/Text/Pandoc/Shared.hs+2−2 src/pandoc.hs+6−6
README+1−1
@@ -384,7 +384,7 @@ For further documentation, see the `pandoc(1)` man page.
384384 is specified, *references* is used regardless of the presence
385385 of this option.
386386
387−`--default-code-classes`*=classes*
387+`--indented-code-classes`*=classes*
388388: specifies classes to use for indented code blocks--for example,
389389 `perl,numberLines` or `haskell`. Multiple classes may be separated
390390 by spaces or commas.
man/man1/pandoc.1.md+1−1
@@ -154,7 +154,7 @@ to Pandoc. Or use `html2markdown`(1), a wrapper around `pandoc`.
154154 If `--strict` is specified, *references* is used regardless of the
155155 presence of this option.
156156
157−\--default-code-classes*=classes*
157+\--indented-code-classes*=classes*
158158: Specify classes to use for indented code blocks--for example,
159159 `perl,numberLines` or `haskell`. Multiple classes may be separated
160160 by spaces or commas.
src/Text/Pandoc/Readers/Markdown.hs+2−1
@@ -395,7 +395,8 @@ codeBlockIndented = do
395395 return $ b ++ l))
396396 optional blanklines
397397 st <- getState
398− return $ CodeBlock ("", stateDefaultCodeClasses st, []) $ stripTrailingNewlines $ concat contents
398+ return $ CodeBlock ("", stateIndentedCodeClasses st, []) $
399+ stripTrailingNewlines $ concat contents
399400
400401lhsCodeBlock :: GenParser Char ParserState Block
401402lhsCodeBlock = do
src/Text/Pandoc/Shared.hs+2−2
@@ -672,7 +672,7 @@ data ParserState = ParserState
672672 stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell
673673 stateColumns :: Int, -- ^ Number of columns in terminal
674674 stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
675− stateDefaultCodeClasses :: [String] -- ^ Classes to use for indented code blocks
675+ stateIndentedCodeClasses :: [String] -- ^ Classes to use for indented code blocks
676676 }
677677 deriving Show
678678
@@ -697,7 +697,7 @@ defaultParserState =
697697 stateLiterateHaskell = False,
698698 stateColumns = 80,
699699 stateHeaderTable = [],
700− stateDefaultCodeClasses = [] }
700+ stateIndentedCodeClasses = [] }
701701
702702data HeaderType
703703 = SingleHeader Char -- ^ Single line of characters underneath
src/pandoc.hs+6−6
@@ -153,7 +153,7 @@ data Opt = Opt
153153 , optSanitizeHTML :: Bool -- ^ Sanitize HTML
154154 , optPlugins :: [Pandoc -> IO Pandoc] -- ^ Plugins to apply
155155 , optEmailObfuscation :: ObfuscationMethod
156− , optDefaultCodeClasses :: [String] -- ^ Default classes for indented code blocks
156+ , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
157157#ifdef _CITEPROC
158158 , optBiblioFile :: String
159159 , optBiblioFormat :: String
@@ -190,7 +190,7 @@ defaultOpts = Opt
190190 , optSanitizeHTML = False
191191 , optPlugins = []
192192 , optEmailObfuscation = JavascriptObfuscation
193− , optDefaultCodeClasses = []
193+ , optIndentedCodeClasses = []
194194#ifdef _CITEPROC
195195 , optBiblioFile = []
196196 , optBiblioFormat = []
@@ -314,9 +314,9 @@ options =
314314 "none|javascript|references")
315315 "" -- "Method for obfuscating email in HTML"
316316
317− , Option "" ["default-code-classes"]
317+ , Option "" ["indented-code-classes"]
318318 (ReqArg
319− (\arg opt -> return opt { optDefaultCodeClasses = words $
319+ (\arg opt -> return opt { optIndentedCodeClasses = words $
320320 map (\c -> if c == ',' then ' ' else c) arg })
321321 "STRING")
322322 "" -- "Classes (whitespace- or comma-separated) to use for indented code-blocks"
@@ -540,7 +540,7 @@ main = do
540540 , optWrapText = wrap
541541 , optSanitizeHTML = sanitize
542542 , optEmailObfuscation = obfuscationMethod
543− , optDefaultCodeClasses = codeBlockClasses
543+ , optIndentedCodeClasses = codeBlockClasses
544544#ifdef _CITEPROC
545545 , optBiblioFile = biblioFile
546546 , optBiblioFormat = biblioFormat
@@ -597,7 +597,7 @@ main = do
597597 ["latex", "context", "man"],
598598 stateColumns = columns,
599599 stateStrict = strict,
600− stateDefaultCodeClasses = codeBlockClasses }
600+ stateIndentedCodeClasses = codeBlockClasses }
601601 let csslink = if null css
602602 then ""
603603 else concatMap