aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/RST.hs
AgeCommit message (Collapse)AuthorFilesLines
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
2012-07-16Don't recognize inline-markup starts inside words.John MacFarlane1-8/+17
For example, "2*2 = 4*1" should not contain an emphasized section. Added test case for "Literal symbols". Closes #569.
2012-05-29RST reader: handle figures.John MacFarlane1-0/+15
Closes #522.
2012-03-25Oops! Forgot to munch whitespace / ignore body after directive.Greg Maslov1-1/+4
2012-03-24Add parsing support for the rST default-role directive.Greg Maslov1-3/+31
2012-03-24RST reader: allow :math:`...` even when not followed by blank or \.John MacFarlane1-2/+3
This does not implement the complex rule described at http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules, but it should be good enough for most purposes. Closes #453.
2012-03-24RST reader: '\ ' is null, not escaped space.John MacFarlane1-1/+3
2011-12-31Support for math in RST reader and writer.John MacFarlane1-4/+5
Inline math uses the :math:`...` construct. Display math uses .. math:: ... or if multilin .. math:: ... These seem to be supported now by rst2latex.py.
2011-12-30Support Sphinx style math in RST reader.John MacFarlane1-4/+35
Inline: :math:`E=mc^2` Block: .. math: E = mc^2 .. math:: E = mc^2 a = b^2 (This latter will turn into a paragraph with two display math elements.) Closes #117.
2011-12-29Better smart quote parsing.John MacFarlane1-1/+5
* Added stateLastStrPos to ParserState. This lets us keep track of whether we're parsing the position immediately after a 'str'. If we encounter a ' in such a location, it must be an apostrophe, and can't be a single quote start. * Set this in the markdown, textile, html, and rst str parsers. * Closes #360.
2011-12-05Parsing: Changed type of escaped to return CharJohn MacFarlane1-1/+2
2011-08-23allow footnotes followed by newline without space charstakahashim1-2/+2
2011-07-23RST reader: Partial support for labeled footnotes.John MacFarlane1-7/+20
Also made simpleReferenceName parser more accurate, which affects several other parsers.
2011-04-20Disallow notes within notes in reST and markdown.John MacFarlane1-5/+11
These previously caused infinite looping and stack overflows. For example: [^1] [^1]: See [^1] Note references are allowed in reST notes, so this isn't a full implementation of reST. That can come later. For now we need to prevent the stack overflows. Partially resolves Issue #297.
2011-04-11Allow '|' followed by newline in RST line block.John MacFarlane1-2/+5
2011-03-18Changed uri parser so it doesn't include trailing punctuation.John MacFarlane1-1/+1
So, in RST, 'http://google.com.' should be parsed as a link to 'http://google.com' followed by a period. The parser is smart enough to recognize balanced parentheses, as often occur in wikipedia links: 'http://foo.bar/baz_(bam)'. Also added ()s to RST specialChars, so '(http://google.com)' will be parsed as a link in parens. Added test cases. Resolves Issue #291.