aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/RST.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-03-11Fixed spacing bugs involving code block attributes.John MacFarlane1-1/+1
Closes #763.
2013-01-27Markdown/RST reader: Skip blank lines.John MacFarlane1-0/+1
This fixes a subtle regression involving grid tables with empty cells. Closes #732. Also added test for grid table with empty cells.
2013-01-25RST reader: Allow anonymous form of explicit links.John MacFarlane1-0/+1
`hello <url>`__ Closes #724.
2013-01-25Use anyLine everywhere instead of 'manyTill anyChar newline'.John MacFarlane1-5/+5
2013-01-13Moved lineBlockLines to Parsing.John MacFarlane1-12/+1
This will be used by both RST and markdown readers.
2013-01-13RST reader: Refactored line block parser.John MacFarlane1-14/+10
2013-01-13RST reader: Line block improvements.John MacFarlane1-3/+8
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block.
2013-01-09Added Attr field to Header.John MacFarlane1-6/+6
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2012-10-06RST reader: Don't create empty definition list for metadata field lists.John MacFarlane1-3/+3
Previously a field list consisting only of metadata fields (author, title, date) would be parsed as an empty DefinitionList, which is not legal in LaTeX and not needed in any format. This patch fixes the problem, which I learned of from http://stackoverflow.com/questions/12762767/modify-variable-in-rst-with-pandoc.
2012-09-30RST reader: Removed 'plain' in blocks, since 'para' includes it.John MacFarlane1-1/+0
2012-09-30RST reader: Consolidate super/subscript, math into interpretedRole.John MacFarlane1-35/+26
2012-09-30RST reader: Renamed 'image' to 'subst', since it now handles more.John MacFarlane1-4/+3
2012-09-30Ignore unknown interpreted roles.John MacFarlane1-3/+12
The contents are treated as rst, not literal, which will sometimes be wrong.
2012-09-30RST reader: Removed requirement that directives begin at left margin.John MacFarlane1-3/+0
This was (correctly) not in earlier releases; docutils doesn't make the requirement.
2012-09-30RST reader: Require whitespace after field list field names.John MacFarlane1-1/+1
2012-09-30RST reader: Consolidated rawBlock into directive.John MacFarlane1-15/+1
2012-09-30RST reader: Handle replace:: and unicode:: substitutions.John MacFarlane1-8/+77
2012-09-29RST reader: Make directive labels case-insensitive.John MacFarlane1-1/+3
2012-09-29RST reader: Folded figureBlock into directive.John MacFarlane1-14/+10
2012-09-29RST reader: Made comments a separate parser.John MacFarlane1-6/+17
2012-09-29RST reader: Folded image block handling into directive.John MacFarlane1-41/+36
2012-09-29RST reader: Folded code block parsers into directive.John MacFarlane1-18/+15
2012-09-29RST reader: Folded default-role parser into directive.John MacFarlane1-21/+8
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-11/+11
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-29RST reader: Consolidated math block parsers into directive.John MacFarlane1-29/+9
2012-09-29RST reader: Refactored directive parser.John MacFarlane1-83/+105
We now also hander container, compound, epigraph, rubric, highligts, pull-quote.
2012-09-28RST reader: Support ".. code::".John MacFarlane1-1/+5
2012-09-28RST reader: Combine para/plain.John MacFarlane1-9/+10
2012-09-28RST reader: Made para parser slightly more efficient.John MacFarlane1-12/+19
2012-09-27RST reader: Use Text.Pandoc.Builder.John MacFarlane1-174/+180
This will give us more flexibility in the future. It also gives built-in normalization. Performance slightly better.
2012-09-27RST reader: Support :target: on image substitutions.John MacFarlane1-26/+26
2012-09-27Added stateSubstitutions to ParserState, use for RST substitutions.John MacFarlane1-12/+18
2012-09-26RST reader: Support :target: on .. image:: blocks.John MacFarlane1-4/+8
Still not supported on substitution definitions.
2012-09-16RST reader: Small tweaks to raw field lists.John MacFarlane1-3/+2
* Don't allow line breaks in field names. * Strip off initial newline from 'raw' when field body begins on next line.
2012-09-16Merge pull request #596 from dlax/rst-fieldlistsJohn MacFarlane1-2/+2
improvements to rst reader for field lists
2012-09-08RST reader: Allow dashes as separator in simple tables.John MacFarlane1-1/+1
Closes #555.
2012-08-29Allow any char but ':' in names of field lists in RST readerDenis Laxalde1-1/+1
2012-08-29Fix RST reader for field lists items with body beginning after a new lineDenis Laxalde1-1/+1
2012-08-08Changes to literate haskell options.John MacFarlane1-1/+1
- 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.
2012-08-01Parsing: removed duplication of Key and Key'.John MacFarlane1-14/+19
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.
2012-08-01Major rewrite of markdown reader.John MacFarlane1-2/+2
* 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).
2012-07-26Fixed whitespace errors.John MacFarlane1-26/+26
2012-07-25Changed reader parameters from ParserState to ReaderOptions.John MacFarlane1-4/+4
2012-07-25Restored stateStandalone as readerStandalone.John MacFarlane1-2/+5
It is indeed needed by the RST reader.
2012-07-25Got rid of stateStandalone, which was hardly used anyway.John MacFarlane1-3/+1
The only possible effect will be with rst fragments that begin with an rst title block, which will now cause the header transform.
2012-07-25Moved stateTabStop to readerTabStop in ReaderOptions.John MacFarlane1-2/+2
2012-07-24Refactored table parsers, captions now not part of core tableWith.John MacFarlane1-2/+2
2012-07-20Use Parser as type synonym for Parsec.John MacFarlane1-92/+92
2012-07-20Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.John MacFarlane1-1/+0
No other module directly imports Parsec. This will make it easier to change the parsing backend in the future, if we want to.
2012-07-20Use Text.Parsec instead of Text.ParserCombinators.Parsec.John MacFarlane1-95/+95