summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Parsing.hs
Commit message (Collapse)AuthorAge
* Markdown reader: Warn about duplicate link references.John MacFarlane2013-01-04
|
* Added stateWarnings.John MacFarlane2013-01-03
| | | | It is not connected to anything yet.
* Implemented `Ext_header_identifiers`, `Ext_implicit_header_references`.John MacFarlane2013-01-03
| | | | | | | | | | | | Now by default pandoc will act as if link references have been defined for all headers. So, you can do this: # My header Link to [My header]. Another link to [it][My header]. Closes #691.
* Fixed bug in withRaw.John MacFarlane2012-12-13
| | | | Didn't correctly handle case where nothing is parsed.
* Revert "Added stateWarnings to ParserState, added warning function."John MacFarlane2012-10-05
| | | | This reverts commit 5419b504cef0cc6e1a0f3e321b2fc0a66e12db3c.
* Added stateWarnings to ParserState, added warning function.John MacFarlane2012-10-05
| | | | | This will be used to provide warnings for things like duplicate footnote refs and link refs.
* Renamed removedLeadingTrailingSpace to trim.John MacFarlane2012-09-29
| | | | | Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
* Parsing: Changed type of stateSubstitutions to use Inlines.John MacFarlane2012-09-27
|
* Removed nullBlock.John MacFarlane2012-09-27
| | | | | Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck.
* Added stateSubstitutions to ParserState, use for RST substitutions.John MacFarlane2012-09-27
|
* Revert "More intelligent handling of text encodings."John MacFarlane2012-09-23
| | | | This reverts commit 7272735b3d413a644fd9ab01eeae8ae9cd5a925b.
* More intelligent handling of text encodings.John MacFarlane2012-09-23
| | | | | | | | | | Previously, UTF-8 was enforced for both input and output. The new system: * For input, UTF-8 is tried first; if an error is raised, the locale encoding is tried. * For output, the locale encoding is always used.
* Revert "Use local encoding for input/output rather than forcing UTF8."John MacFarlane2012-09-23
| | | | This reverts commit c69837adb648a479167be5e2d37279a02be8060c.
* Use local encoding for input/output rather than forcing UTF8.John MacFarlane2012-09-23
| | | | | | | Note that system templates are stored as UTF8 and will still be read as such, even if the local encoding is different. Text downloaded from URLs will also be treated as UTF-8.
* Export 'nested' in Parsing.John MacFarlane2012-09-12
|
* Text.Pandoc.Parsing: Handle trailing slash in 'uri'.John MacFarlane2012-09-12
|
* Parsing: Generalized type of withQuoteContext.John MacFarlane2012-09-09
|
* Changes to literate haskell options.John MacFarlane2012-08-08
| | | | | | | | | | | - Removed writerLiterateHaskell from WriterOptions. - Removed readerLiterateHaskell from ReaderOptions. - Added Ext_literate_haskell to Extensions. Test for this instead of the above. - Removed failUnlessLHS from Shared. Note: At this point, +lhs and .lhs extension no longer has any effect. Need to fix.
* Made F a newtype, moved definitions to Parser.John MacFarlane2012-08-02
| | | | Parser now exports F(..), askF, asksF, runF.
* Parsing: removed duplication of Key and Key'.John MacFarlane2012-08-01
| | | | | | | Now we just use the former Key' (string contents), renamed Key. lookupKeySrc and fromKey are no longer eport. Key', toKey' and KeyTable' have become Key, toKey, and KeyTable.
* Major rewrite of markdown reader.John MacFarlane2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | * Use Builder's Inlines/Blocks instead of lists. * Return values in the reader monad, which are then run (at the end of parsing) against the final parser state. This allows links, notes, and example numbers to be resolved without a second parser pass. * An effect of using Builder is that everything is normalized automatically. * New exports from Text.Pandoc.Parsing: widthsFromIndices, NoteTable', KeyTable', Key', toKey', withQuoteContext, singleQuoteStart, singleQuoteEnd, doubleQuoteStart, doubleQuoteEnd, ellipses, apostrophe, dash * Updated opendocument tests. * Don't derive Show for ParserState. * Benchmarks: markdown reader takes 82% of the time it took before. Markdown writer takes 92% of the time (here the speedup is probably due to the fact that everything is normalized by default).
* Removed commented-out pandoc2 code.John MacFarlane2012-07-27
| | | | This will be developed in a branch, noreparsing.
* Parser: Changed types to use type alias Parser, not Parsec.John MacFarlane2012-07-27
|
* Fixed whitespace errors.John MacFarlane2012-07-26
|
* Parsing: Removed failIfStrict.John MacFarlane2012-07-26
|
* Parsing: Added guardEnabled, guardDisabled.John MacFarlane2012-07-26
|
* Moved stateApplyMacros, stateIndentedCodeClasses to ReaderOptions.John MacFarlane2012-07-25
|
* stateCitations -> readerCitations.John MacFarlane2012-07-25
|
* Moved stateLiterateHaskell to readerLiterateHaskell in Options.John MacFarlane2012-07-25
|
* Got rid of stateStandalone, which was hardly used anyway.John MacFarlane2012-07-25
| | | | | | The only possible effect will be with rst fragments that begin with an rst title block, which will now cause the header transform.
* Moved stateOldDashes to readerOldDashes in ReaderOptions.John MacFarlane2012-07-25
|
* Moved stateTabStop to readerTabStop in ReaderOptions.John MacFarlane2012-07-25
|
* Moved stateColumns to readerColumns in ReaderOptions.John MacFarlane2012-07-25
|
* Moved ParseRaw from ParserState to ReaderOptions.John MacFarlane2012-07-25
|
* Text.Pandoc.Parsing: Added getOption.John MacFarlane2012-07-25
|
* Options -> ReaderOptions.John MacFarlane2012-07-25
| | | | Better to keep reader and writer options separate.
* Put smart, strict in separate options field in state.John MacFarlane2012-07-25
| | | | | | | | | This is the beginning of a larger transition that will make Options, not ParserState, the parameter of the read functions. (Options will also be used in writers, in place of WriterOptions.) Next step is to remove strict, replacing it with granular tests for different extensions.
* Better algorithm for oneOfStrings.John MacFarlane2012-07-24
| | | | This goes character by character, not backtracking.
* Refactored table parsers, captions now not part of core tableWith.John MacFarlane2012-07-24
|
* Revised code for pipe tables.John MacFarlane2012-07-22
| | | | | | | | | | * All tables now require at least one body row. * Renamed from 'extra' to 'pipe' tables. * Moved functions from Parsing to Readers.Markdown. * Cleaned up code; revised to parse in one pass rather than parsing a raw string, splitting it, and parsing the components. * Allow pipe tables without pipes on the ends (as PHP Markdown Extra does).
* Merge pull request #510 from mytskine/markdown-extraJohn MacFarlane2012-07-22
|\ | | | | Markdown extra tables [part of the multi-markdown syntax for tables]
| * Added support for markdown-extra tables in the markdown parserFrançois Gannaz2012-02-21
| | | | | | | | | | Only tables whose lines begin with a "|" are supported. There are 2 warnings about unused variables when compiling.
* | Use Parser as type synonym for Parsec.John MacFarlane2012-07-20
| |
* | Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.John MacFarlane2012-07-20
| | | | | | | | | | No other module directly imports Parsec. This will make it easier to change the parsing backend in the future, if we want to.
* | Use Text.Parsec instead of Text.ParserCombinators.Parsec.John MacFarlane2012-07-20
| |
* | Provide Data.Default instances for ParserState and WriterOptions.John MacFarlane2012-07-19
| | | | | | | | | | | | | | | | Now you can use def (which is re-exported by Text.Pandoc) instead of defaultParserState or defaultWriterOptions. For now, these are still defined too, so existing code need not change. Closes #546.
* | Changed macro parser so it returns raw macro if stateApplyMacros false.John MacFarlane2012-06-29
| | | | | | | | Closes #554.
* | textile reader improvements : better conformance to RedCloth Textile inlinespaul.rivier2012-04-24
| |
* | Add parsing support for the rST default-role directive.Greg Maslov2012-03-24
|/
* Limit nesting of strong/emph.John MacFarlane2012-02-07
| | | | | | | | | | This avoids exponential lookahead in parasitic cases, like a**a*a**a*a**a*a**a*a**a*a**a*a**a*a**. Added stateMaxNestingLevel to ParserState. We set this to 6, so you can still have Emph inside Emph, just not indefinitely.