aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Extensions.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08CommonMark reader: support `gfm_auto_identifiers`.John MacFarlane1-1/+3
Added `Ext_gfm_auto_identifiers`: new constructor for `Extension` in `Text.Pandoc.Extensions` [API change]. Use this in githubExtensions. Closes #2821.
2017-08-07Remove GFM modules; use CMarkGFM for both gfm and commonmark.John MacFarlane1-0/+1
We no longer have a separate readGFM and writeGFM; instead, we'll use readCommonMark and writeCommonMark with githubExtensions. It remains to implement these extensions conditionally. Closes #3841.
2017-07-07Rewrote LaTeX reader with proper tokenization.John MacFarlane1-0/+1
This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
2017-06-30Removed `hard_line_breaks` extension from `markdown_github`.John MacFarlane1-1/+0
GitHub has two Markdown modes, one for long-form documents like READMEs and one for short things like issue coments. In issue comments, a line break is treated as a hard line break. In README, wikis, etc., it is treated as a space as in regular Markdown. Since pandoc is more likely to be used to convert long-form documents from GitHub Markdown, `-hard_line_breaks` is a better default. Closes #3594.
2017-06-24Extensions: Monoid instance for Extensions.John MacFarlane1-1/+5
[API change]
2017-06-23Text.Pandoc.Extensions: Added `Ext_raw_attribute`.John MacFarlane1-0/+4
Documented in MANUAL.txt. This is enabled by default in pandoc markdown and multimarkdown.
2017-05-25Added `spaced_reference_links` extension.John MacFarlane1-1/+5
This is now the default for pandoc's Markdown. It allows whitespace between the two parts of a reference link: e.g. [a] [b] [b]: url This is now forbidden by default. Closes #2602.
2017-05-04Include `backtick_code_blocks` extension in `mardkown_mmd`.John MacFarlane1-0/+1
Closes #3637.
2017-04-26API change: move extension handling to Text.Pandoc.ExtensionsAlbert Krewinkel1-4/+74
Extension parsing and processing functions were defined in the top-level Text.Pandoc module. These functions are moved to the Extensions submodule as to enable reuse in other submodules.
2017-03-20Add `space_in_atx_header` extension.John MacFarlane1-0/+3
This is enabled by default in pandoc and GitHub markdown but not the other flavors. This requirse a space between the opening #'s and the header text in ATX headers (as CommonMark does but many other implementations do not). This is desirable to avoid falsely capturing things ilke #hashtag or #5 Closes #3512.
2017-03-05Markdown reader: fixed internal header links.John MacFarlane1-0/+1
Closes #2397. This patch also adds `shortcut_reference_links` to the list of mmd extensions.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-2/+3
2017-01-25Put an Integer rather than Word64 behind Extensions.John MacFarlane1-3/+2
This allows us to expand indefinitely. No measurable performance penalty.
2017-01-25Made `smart` extension default for pandoc markdown.John MacFarlane1-0/+1
Updated tests.
2017-01-25Removed readerOldDashes and --old-dashes option, added old_dashes extension.John MacFarlane1-0/+1
API change. CLI option change.
2017-01-25Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane1-0/+1
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
2017-01-25Make Extensions a custom type instead of a Set Extension.John MacFarlane1-17/+37
The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
2017-01-25Split extensions code from Options into separate Text.Pandoc.Extensions.John MacFarlane1-0/+245
API change. However, Extensions exports Options, so this shouldn't have much impact.