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
This commit is contained in:
parent
c4915eace0
commit
eb5550a6e4
5 changed files with 12 additions and 11 deletions
2
README
2
README
|
@ -384,7 +384,7 @@ For further documentation, see the `pandoc(1)` man page.
|
||||||
is specified, *references* is used regardless of the presence
|
is specified, *references* is used regardless of the presence
|
||||||
of this option.
|
of this option.
|
||||||
|
|
||||||
`--default-code-classes`*=classes*
|
`--indented-code-classes`*=classes*
|
||||||
: specifies classes to use for indented code blocks--for example,
|
: specifies classes to use for indented code blocks--for example,
|
||||||
`perl,numberLines` or `haskell`. Multiple classes may be separated
|
`perl,numberLines` or `haskell`. Multiple classes may be separated
|
||||||
by spaces or commas.
|
by spaces or commas.
|
||||||
|
|
|
@ -154,7 +154,7 @@ to Pandoc. Or use `html2markdown`(1), a wrapper around `pandoc`.
|
||||||
If `--strict` is specified, *references* is used regardless of the
|
If `--strict` is specified, *references* is used regardless of the
|
||||||
presence of this option.
|
presence of this option.
|
||||||
|
|
||||||
\--default-code-classes*=classes*
|
\--indented-code-classes*=classes*
|
||||||
: Specify classes to use for indented code blocks--for example,
|
: Specify classes to use for indented code blocks--for example,
|
||||||
`perl,numberLines` or `haskell`. Multiple classes may be separated
|
`perl,numberLines` or `haskell`. Multiple classes may be separated
|
||||||
by spaces or commas.
|
by spaces or commas.
|
||||||
|
|
|
@ -395,7 +395,8 @@ codeBlockIndented = do
|
||||||
return $ b ++ l))
|
return $ b ++ l))
|
||||||
optional blanklines
|
optional blanklines
|
||||||
st <- getState
|
st <- getState
|
||||||
return $ CodeBlock ("", stateDefaultCodeClasses st, []) $ stripTrailingNewlines $ concat contents
|
return $ CodeBlock ("", stateIndentedCodeClasses st, []) $
|
||||||
|
stripTrailingNewlines $ concat contents
|
||||||
|
|
||||||
lhsCodeBlock :: GenParser Char ParserState Block
|
lhsCodeBlock :: GenParser Char ParserState Block
|
||||||
lhsCodeBlock = do
|
lhsCodeBlock = do
|
||||||
|
|
|
@ -672,7 +672,7 @@ data ParserState = ParserState
|
||||||
stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell
|
stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell
|
||||||
stateColumns :: Int, -- ^ Number of columns in terminal
|
stateColumns :: Int, -- ^ Number of columns in terminal
|
||||||
stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
|
stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
|
||||||
stateDefaultCodeClasses :: [String] -- ^ Classes to use for indented code blocks
|
stateIndentedCodeClasses :: [String] -- ^ Classes to use for indented code blocks
|
||||||
}
|
}
|
||||||
deriving Show
|
deriving Show
|
||||||
|
|
||||||
|
@ -697,7 +697,7 @@ defaultParserState =
|
||||||
stateLiterateHaskell = False,
|
stateLiterateHaskell = False,
|
||||||
stateColumns = 80,
|
stateColumns = 80,
|
||||||
stateHeaderTable = [],
|
stateHeaderTable = [],
|
||||||
stateDefaultCodeClasses = [] }
|
stateIndentedCodeClasses = [] }
|
||||||
|
|
||||||
data HeaderType
|
data HeaderType
|
||||||
= SingleHeader Char -- ^ Single line of characters underneath
|
= SingleHeader Char -- ^ Single line of characters underneath
|
||||||
|
|
|
@ -153,7 +153,7 @@ data Opt = Opt
|
||||||
, optSanitizeHTML :: Bool -- ^ Sanitize HTML
|
, optSanitizeHTML :: Bool -- ^ Sanitize HTML
|
||||||
, optPlugins :: [Pandoc -> IO Pandoc] -- ^ Plugins to apply
|
, optPlugins :: [Pandoc -> IO Pandoc] -- ^ Plugins to apply
|
||||||
, optEmailObfuscation :: ObfuscationMethod
|
, optEmailObfuscation :: ObfuscationMethod
|
||||||
, optDefaultCodeClasses :: [String] -- ^ Default classes for indented code blocks
|
, optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
|
||||||
#ifdef _CITEPROC
|
#ifdef _CITEPROC
|
||||||
, optBiblioFile :: String
|
, optBiblioFile :: String
|
||||||
, optBiblioFormat :: String
|
, optBiblioFormat :: String
|
||||||
|
@ -190,7 +190,7 @@ defaultOpts = Opt
|
||||||
, optSanitizeHTML = False
|
, optSanitizeHTML = False
|
||||||
, optPlugins = []
|
, optPlugins = []
|
||||||
, optEmailObfuscation = JavascriptObfuscation
|
, optEmailObfuscation = JavascriptObfuscation
|
||||||
, optDefaultCodeClasses = []
|
, optIndentedCodeClasses = []
|
||||||
#ifdef _CITEPROC
|
#ifdef _CITEPROC
|
||||||
, optBiblioFile = []
|
, optBiblioFile = []
|
||||||
, optBiblioFormat = []
|
, optBiblioFormat = []
|
||||||
|
@ -314,9 +314,9 @@ options =
|
||||||
"none|javascript|references")
|
"none|javascript|references")
|
||||||
"" -- "Method for obfuscating email in HTML"
|
"" -- "Method for obfuscating email in HTML"
|
||||||
|
|
||||||
, Option "" ["default-code-classes"]
|
, Option "" ["indented-code-classes"]
|
||||||
(ReqArg
|
(ReqArg
|
||||||
(\arg opt -> return opt { optDefaultCodeClasses = words $
|
(\arg opt -> return opt { optIndentedCodeClasses = words $
|
||||||
map (\c -> if c == ',' then ' ' else c) arg })
|
map (\c -> if c == ',' then ' ' else c) arg })
|
||||||
"STRING")
|
"STRING")
|
||||||
"" -- "Classes (whitespace- or comma-separated) to use for indented code-blocks"
|
"" -- "Classes (whitespace- or comma-separated) to use for indented code-blocks"
|
||||||
|
@ -540,7 +540,7 @@ main = do
|
||||||
, optWrapText = wrap
|
, optWrapText = wrap
|
||||||
, optSanitizeHTML = sanitize
|
, optSanitizeHTML = sanitize
|
||||||
, optEmailObfuscation = obfuscationMethod
|
, optEmailObfuscation = obfuscationMethod
|
||||||
, optDefaultCodeClasses = codeBlockClasses
|
, optIndentedCodeClasses = codeBlockClasses
|
||||||
#ifdef _CITEPROC
|
#ifdef _CITEPROC
|
||||||
, optBiblioFile = biblioFile
|
, optBiblioFile = biblioFile
|
||||||
, optBiblioFormat = biblioFormat
|
, optBiblioFormat = biblioFormat
|
||||||
|
@ -597,7 +597,7 @@ main = do
|
||||||
["latex", "context", "man"],
|
["latex", "context", "man"],
|
||||||
stateColumns = columns,
|
stateColumns = columns,
|
||||||
stateStrict = strict,
|
stateStrict = strict,
|
||||||
stateDefaultCodeClasses = codeBlockClasses }
|
stateIndentedCodeClasses = codeBlockClasses }
|
||||||
let csslink = if null css
|
let csslink = if null css
|
||||||
then ""
|
then ""
|
||||||
else concatMap
|
else concatMap
|
||||||
|
|
Loading…
Reference in a new issue