Added --normalize option.
This commit is contained in:
parent
e5e2b0f9ab
commit
9bb5b54102
2 changed files with 11 additions and 1 deletions
4
README
4
README
|
@ -186,6 +186,10 @@ Options
|
|||
equivalents in standard markdown (e.g. definition lists or strikeout
|
||||
text) will be parsed as raw HTML.
|
||||
|
||||
`--normalize`
|
||||
: Normalize the document after reading: merge adjacent
|
||||
`Str` or `Emph` elements, for example, and remove repeated `Space`s.
|
||||
|
||||
`--reference-links`
|
||||
: Use reference-style links, rather than inline links, in writing markdown
|
||||
or reStructuredText. By default inline links are used.
|
||||
|
|
|
@ -32,7 +32,7 @@ module Main where
|
|||
import Text.Pandoc
|
||||
import Text.Pandoc.S5 (s5HeaderIncludes)
|
||||
import Text.Pandoc.Shared ( tabFilter, ObfuscationMethod (..), readDataFile,
|
||||
headerShift, findDataFile )
|
||||
headerShift, findDataFile, normalize )
|
||||
#ifdef _HIGHLIGHTING
|
||||
import Text.Pandoc.Highlighting ( languages )
|
||||
#endif
|
||||
|
@ -215,6 +215,12 @@ options =
|
|||
(\opt -> return opt { optStrict = True } ))
|
||||
"" -- "Disable markdown syntax extensions"
|
||||
|
||||
, Option "" ["normalize"]
|
||||
(NoArg
|
||||
(\opt -> return opt { optTransforms =
|
||||
normalize : optTransforms opt } ))
|
||||
"" -- "Normalize the Pandoc AST"
|
||||
|
||||
, Option "" ["reference-links"]
|
||||
(NoArg
|
||||
(\opt -> return opt { optReferenceLinks = True } ))
|
||||
|
|
Loading…
Reference in a new issue