summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/RST.hs
Commit message (Collapse)AuthorAge
...
* Better smart quote parsing.John MacFarlane2011-12-29
| | | | | | | | | | | * 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.
* Parsing: Changed type of escaped to return CharJohn MacFarlane2011-12-05
|
* allow footnotes followed by newline without space charstakahashim2011-08-23
|
* RST reader: Partial support for labeled footnotes.John MacFarlane2011-07-23
| | | | | Also made simpleReferenceName parser more accurate, which affects several other parsers.
* Disallow notes within notes in reST and markdown.John MacFarlane2011-04-20
| | | | | | | | | | | | | | | 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.
* Allow '|' followed by newline in RST line block.John MacFarlane2011-04-11
|
* Changed uri parser so it doesn't include trailing punctuation.John MacFarlane2011-03-18
| | | | | | | | | | | | | | | 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.
* Fixed bug in RST field list parser.John MacFarlane2011-03-12
| | | | | The bug affected field lists with multi-line items at the end of the list.
* RST reader: skip blanklines at beginning, not all leading spaces.John MacFarlane2011-01-28
| | | | | If you skip all spaces, it becomes impossible to start with a blockquote.
* RST reader: Skip blank space at beginning.John MacFarlane2011-01-28
| | | | Resolves Debian Bug #611328.
* Add support for attributes in inline Code.John MacFarlane2011-01-26
| | | | | | | | Additional related changes: * URLs in Code in autolinks now use class "url". * Require highlighting-kate 0.2.8.2, which omits the final <br/> tag, essential for inline code.
* RST reader: Improved field lists.John MacFarlane2011-01-26
| | | | | | | | | | | Field lists now work properly with block content. (Thanks to Lachlan Musicman for pointing out the bug.) In addition, definition list items are now always Para instead of Plain -- which matches behavior of rst2xml.py. Finally, in image blocks, the alt attribute is parsed properly and used for the alt, not also the title.
* RST reader: Include line breaks in raw field list parser output.John MacFarlane2011-01-26
| | | | Note: field list items can have lists, etc. as values.
* RST reader: Allow spaces in field list names.John MacFarlane2011-01-26
|
* Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane2011-01-26
| | | | | | | The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.
* RST reader: Big speed improvement (300->260ms).John MacFarlane2011-01-22
| | | | Moved whitespace parser to top of inline parsers.
* Use spaceChar instead of oneOf " \t" in rst reader.John MacFarlane2011-01-19
|
* RST reader: Added unicode quote characters to specialChars.John MacFarlane2010-12-22
| | | | (So they can trigger Quoted environments.)
* RST reader: recouped speed loss due to addition of --smart.John MacFarlane2010-12-22
| | | | | | | | This was achieved by rearranging the parsers in inline. Benchmarks went from 500ms to 307ms -- not quite back to the 279ms we had in 1.6, before supporting smart punctuation and footnotes, but close.
* RST reader: Added footnote suppport.John MacFarlane2010-12-08
| | | | | | | | | Resolves issue #258. Note that there are some differences in how docutils and pandoc treat footnotes. Currently pandoc ignores the numeral or symbol used in the note; footnotes are put in an auto-numbered ordered list.
* Made --smart work with RST reader.John MacFarlane2010-12-07
|
* Fix regression: markdown references should be case-insensitive.John MacFarlane2010-12-05
| | | | | | | | | | | | | | | | This broke when we added the Key type. We had assumed that the custom case-insensitive Ord instance would ensure case-insensitive matching, but that is not how Data.Map works. * Added a test case for case-insensitivity in markdown-reader-more * Removed old refsMatch from Text.Pandoc.Parsing module; * hid the 'Key' constructor; * dropped the custom Ord and Eq instances, deriving instead; * added fromKey and toKey to convert between Keys and Inline lists; * toKey ensures that keys are case-insensitive, since this is the only way the API provides to construct a Key. Resolves Issue #272.
* Merge branch 'atlists'. Added auto-numbered example lists.John MacFarlane2010-07-11
|\
| * Implemented @ for sequentially numbered examples.John MacFarlane2010-03-27
| | | | | | | | Also implemented (@label) for example labels and references.
* | Minor comment change.John MacFarlane2010-07-06
| |
* | More refactoring of grid table code.John MacFarlane2010-07-05
| |
* | Moved generic grid table functions from RST reader -> Parsing.John MacFarlane2010-07-05
| | | | | | | | Here they can be used by the Markdown reader as well.
* | Moved parsing functions from Text.Pandoc.Shared to new module.John MacFarlane2010-07-05
| | | | | | | | + Text.Pandoc.Parsing
* | Made KeyTable a map instead of an association list.John MacFarlane2010-05-08
|/ | | | | | | | * This affects the RST and Markdown readers. * The type for stateKeys in ParserState has also changed. * Pandoc, Meta, Inline, and Block have been given Ord instances. * Reference keys now have a type of their own (Key), with its own Ord instance for case-insensitive comparison.
* Properly escape URIs in all readers.John MacFarlane2010-03-23
|
* Updated copyright notices.John MacFarlane2010-03-23
|
* RST reader: Improved grid tables.fiddlosopher2010-02-27
| | | | | | | | | + Table cells can now contain multiple block elements, such as lists or paragraphs. + Table parser is now forgiving of spaces at ends of lines. + Added test cases. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1852 788f1e2b-df1e-0410-8736-df70ead52e1b
* Incomplete support for RST tables (simple and grid).fiddlosopher2010-02-20
| | | | | | | Thanks to Eric Kow. Note TODO for future improvement in RST reader code comments. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1840 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed Meta author and date types to Inline lists instead of Strings.fiddlosopher2009-12-31
| | | | | | | | | | | | Meta [Inline] [[Inline]] [Inline] rather than Meta [Inline] [String] String. This is a breaking change for libraries that use pandoc and manipulate the metadata. Changed .native files in test suite for new Meta format. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1699 788f1e2b-df1e-0410-8736-df70ead52e1b
* RST reader: Allow :: before lhs code block.fiddlosopher2009-12-22
| | | | | | | | The RST spec requires the :: before verbatim blocks. This :: should not be treated as literal colons. Resolves Issue #189. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1668 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improved syntax for markdown definition lists.fiddlosopher2009-12-07
| | | | | | | | | | | | | | | | | | | Definition lists are now more compatible with PHP Markdown Extra. Resolves Issue #24. + You can have multiple definitions for a term (but still not multiple terms). + Multi-block definitions no longer need a column before each block (indeed, this will now cause multiple definitions). + The marker no longer needs to be flush with the left margin, but can be indented at or two spaces. Also, ~ as well as : can be used as the marker (this suggestion due to David Wheeler.) + There can now be a blank line between the term and the definitions. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1656 788f1e2b-df1e-0410-8736-df70ead52e1b
* Support for "..code-block" directive in RST reader.fiddlosopher2009-11-17
| | | | | | | Not core RST, but used in Sphinx for code blocks annotated with syntax information. Thanks to Luke Plant for the patch. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1619 788f1e2b-df1e-0410-8736-df70ead52e1b
* Specially mark code blocks that were "literate" in the input.fiddlosopher2009-11-03
| | | | | | | | | | | They can then be treated differently in the writers. This allows authors to distinguish bits of the literate program they are writing from source code examples, even if the examples are marked as Haskell for highlighting. Resolves Issue #174. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1618 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added % as an rst underline character.fiddlosopher2009-10-29
| | | | | | Resolves Issue #173. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1612 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added haddock comments warning that readers assume \n line endings.fiddlosopher2009-10-04
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1608 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improved clarity of titleTransform in RST reader.fiddlosopher2009-07-11
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1592 788f1e2b-df1e-0410-8736-df70ead52e1b
* Allow continuation lines in line blocks.fiddlosopher2009-06-25
| | | | | | | Also added test cases for line blocks for RST reader. Resolves Issue #149. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1583 788f1e2b-df1e-0410-8736-df70ead52e1b
* RST reader: Allow explicit links with spaces in URL: `link <to this>`_fiddlosopher2009-05-04
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1576 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved all haskell source to src subdirectory.fiddlosopher2009-01-24
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved everything from src into the top-level directory.fiddlosopher2007-11-29
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
* Reverted back to state as of r1062. The template haskell changesfiddlosopher2007-11-03
| | | | | | | are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use template haskell to avoid the need for templates:fiddlosopher2007-11-03
| | | | | | | | | | | | | | | | | | + Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed bug in parsing files that begin with blank lines.fiddlosopher2007-10-29
| | | | | | | | | | | + In Text.Pandoc.Shared: rewrote lineClump to parse EITHER a string of blank lines OR a string of nonblanks. Removed code for parsing eof. + In Markdown and RST readers, use 'manyTill (... <|> lineClump) eof' instead of many, since lineClump no longer parses eof. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1057 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improvements to RST reader:fiddlosopher2007-10-13
| | | | | | | | | | | | | | + Allow field lists to be indented. + Parse the contents of field lists instead of treating them as raw strings. + Represent field lists as definition lists rather than blockquotes. + Fixed bug in which metadata would be overridden if the document contained more than one field list. + Parse fields associated with ..image: blocks, and use the 'alt' field, if present, for image alt text and title. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1050 788f1e2b-df1e-0410-8736-df70ead52e1b
* Fixed bug in RST reader: previously, code blocks had to befiddlosopher2007-10-11
| | | | | | | | | | | | | indented a full tabstop, but RST allows any amount of indentation. Resolves Issue #27. + removed 'variable' parameter from indentedBlock function in RST reader, as it is no longer needed + updated test suite + updated changelog git-svn-id: https://pandoc.googlecode.com/svn/trunk@1046 788f1e2b-df1e-0410-8736-df70ead52e1b