summaryrefslogtreecommitdiff
path: root/tests/rst-reader.native
Commit message (Collapse)AuthorAge
* RST reader: Some fixes to last change, and use "author" not "authors".John MacFarlane2014-04-30
| | | | (in metadata)
* Enhanced Pandoc's support for rST roles.Merijn Verstraaten2014-02-15
| | | | | | | | | | | | | | | | rST parser now supports: - All built-in rST roles - New role definition - Role inheritance Issues/TODO: - Silently ignores illegal fields on roles - Silently drops class annotations for roles - Only supports :format: fields with a single format for :raw: roles, requires a change to Text.Pandoc.Definition.Format to support multiple formats. - Allows direct use of :raw: role, rST only allows indirect (i.e., inherited use of :raw:).
* Use registerHeader in RST and LaTeX readers.John MacFarlane2013-09-01
| | | | | This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
* Updated tests for latest pandoc-types changes.John MacFarlane2013-08-16
|
* Updated for removed unMeta, unFormat in pandoc-types.John MacFarlane2013-08-14
|
* Updated tests for new Format.John MacFarlane2013-08-10
|
* Fixed 'authors' metadata parsing in reST.John MacFarlane2013-06-25
| | | | Semicolons separate different authors.
* RST reader: don't insert paragraphs where docutils doesn't.John MacFarlane2013-06-18
| | | | | | | | | rst2html doesn't add `<p>` tags to list items (even when they are separated by blank lines) unless there are multiple paragraphs in the list. This commit changes the RST reader to conform more closely to what docutils does. Closes #880.
* RST reader: Line block improvements.John MacFarlane2013-01-13
| | | | | | * Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block.
* Added Attr field to Header.John MacFarlane2013-01-09
| | | | | | | | | | 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.
* RST reader: Consolidate super/subscript, math into interpretedRole.John MacFarlane2012-09-30
|
* RST reader: Consolidated rawBlock into directive.John MacFarlane2012-09-30
|
* RST reader: Use Text.Pandoc.Builder.John MacFarlane2012-09-27
| | | | | | This will give us more flexibility in the future. It also gives built-in normalization. Performance slightly better.
* RST reader: Support :target: on image substitutions.John MacFarlane2012-09-27
|
* RST reader: Support :target: on .. image:: blocks.John MacFarlane2012-09-26
| | | | Still not supported on substitution definitions.
* Don't recognize inline-markup starts inside words.John MacFarlane2012-07-16
| | | | | For example, "2*2 = 4*1" should not contain an emphasized section. Added test case for "Literal symbols". Closes #569.
* Oops! Forgot to munch whitespace / ignore body after directive.Greg Maslov2012-03-25
|
* Add parsing support for the rST default-role directive.Greg Maslov2012-03-24
|
* New treatment of dashes in --smart mode.John MacFarlane2012-01-01
| | | | | | | | | | | | * `---` is always em-dash, `--` is always en-dash. * pandoc no longer tries to guess when `-` should be en-dash. * A new option, `--old-dashes`, is provided for legacy documents. Rationale: The rules for en-dash are too complex and language-dependent for a guesser to work reliably. This change gives users greater control. The alternative of using unicode isn't very good, since unicode em- and en- dashes are barely distinguishable in a monospace font.
* Support for math in RST reader and writer.John MacFarlane2011-12-31
| | | | | | | | | | | | | | | | Inline math uses the :math:`...` construct. Display math uses .. math:: ... or if multilin .. math:: ... These seem to be supported now by rst2latex.py.
* Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane2011-12-27
|
* 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.
* 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.
* 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.
* Make sure native output ends in newline with --standalone.John MacFarlane2011-01-21
|
* Updated tests for new native format.John MacFarlane2011-01-20
|
* 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
|
* Made spacing at end of output more consistent.John MacFarlane2010-07-20
| | | | | | | | | | | | Previously some of the writers added spurious whitespace. This has been removed, resolving Issue #232. NOTE: If your application combines pandoc's output with other text, for example in a template, you may need to add spacing. For example, a pandoc-generated markdown file will not have a blank line after the final block element. If you are inserting it into another markdown file, you will need to make sure there is a blank line between it and the next block element.
* Added accessors (docTitle, docAuthors, docDate) to Meta type.fiddlosopher2010-02-28
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1853 788f1e2b-df1e-0410-8736-df70ead52e1b
* 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
* 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
* RST reader: Allow # to continue list...fiddlosopher2009-06-28
| | | | | | | | | | | | ...even if the list was started with an explicit marker. For example: A. my list #. continued Resolves Issue #140. Test case also added. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1584 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
* Fixed parsing of RST comment blocks.fiddlosopher2008-11-06
| | | | | | | | | Modified 'unknown directive' in RST reader. Added RST reader tests for comment blocks. Resolves Issue #86 and Debian Bug#500662. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1484 788f1e2b-df1e-0410-8736-df70ead52e1b
* Updated test suite to new baseline (but no tests yet for new code block syntax).fiddlosopher2008-02-09
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1210 788f1e2b-df1e-0410-8736-df70ead52e1b
* Modified tests for new argument in CodeBlock.fiddlosopher2008-02-09
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1201 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
* Major change in the way ordered lists are handled:fiddlosopher2007-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + The changes are documented in README, under Lists. + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information, when possible. + The writers use this information to style ordered lists. + Test suites have been changed accordingly. Motivation: It's often useful to start lists with numbers other than 1, and to have control over the style of the list. Added to Text.Pandoc.Shared: + camelCaseToHyphenated + toRomanNumeral + anyOrderedListMarker + orderedListMarker + orderedListMarkers Added to Text.Pandoc.ParserCombinators: + charsInBalanced' + withHorizDisplacement + romanNumeral RST writer: + Force blank line before lists, so that sublists will be handled correctly. LaTeX reader: + Fixed bug in parsing of footnotes containing multiple paragraphs, introduced by use of charsInBalanced. Fix: use charsInBalanced' instead. LaTeX header: + use mathletters option in ucs package, so that basic unicode Greek letters will work properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
* Brought test suite up to date.fiddlosopher2007-07-28
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@828 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for definition lists to RST reader.fiddlosopher2007-07-23
| | | | | | | Added a relevant test to the test suite. git-svn-id: https://pandoc.googlecode.com/svn/trunk@782 788f1e2b-df1e-0410-8736-df70ead52e1b
* Updated RST reader test.fiddlosopher2007-07-22
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@778 788f1e2b-df1e-0410-8736-df70ead52e1b
* Extensive changes stemming from a rethinking of the Pandoc datafiddlosopher2007-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structure. Key and Note blocks have been removed. Link and image URLs are now stored directly in Link and Image inlines, and note blocks are stored in Note inlines. This requires changes in both parsers and writers. Markdown and RST parsers need to extract data from key and note blocks and insert them into the relevant inline elements. Other parsers can be simplified, since there is no longer any need to construct separate key and note blocks. Markdown, RST, and HTML writers need to construct lists of notes; Markdown and RST writers need to construct lists of link references (when the --reference-links option is specified); and the RST writer needs to construct a list of image substitution references. All writers have been rewritten to use the State monad when state is required. This rewrite yields a small speed boost and considerably cleaner code. * Text/Pandoc/Definition.hs: + blocks: removed Key and Note + inlines: removed NoteRef, added Note + modified Target: there is no longer a 'Ref' target; all targets are explicit URL, title pairs * Text/Pandoc/Shared.hs: + Added 'Reference', 'isNoteBlock', 'isKeyBlock', 'isLineClump', used in some of the readers. + Removed 'generateReference', 'keyTable', 'replaceReferenceLinks', 'replaceRefLinksBlockList', along with some auxiliary functions used only by them. These are no longer needed, since reference links are resolved in the Markdown and RST readers. + Moved 'inTags', 'selfClosingTag', 'inTagsSimple', and 'inTagsIndented' to the Docbook writer, since that is now the only module that uses them. + Changed name of 'escapeSGMLString' to 'escapeStringForXML' + Added KeyTable and NoteTable types + Removed fields from ParserState; 'stateKeyBlocks', 'stateKeysUsed', 'stateNoteBlocks', 'stateNoteIdentifiers', 'stateInlineLinks'. Added 'stateKeys' and 'stateNotes'. + Added clause for Note to 'prettyBlock'. + Added 'writerNotes', 'writerReferenceLinks' fields to WriterOptions. * Text/Pandoc/Entities.hs: Renamed 'escapeSGMLChar' and 'escapeSGMLString' to 'escapeCharForXML' and 'escapeStringForXML' * Text/ParserCombinators/Pandoc.hs: Added lineClump parser: parses a raw line block up to and including following blank lines. * Main.hs: Replaced --inline-links with --reference-links. * README: + Documented --reference-links and removed description of --inline-links. + Added note that footnotes may occur anywhere in the document, but must be at the outer level, not embedded in block elements. * man/man1/pandoc.1, man/man1/html2markdown.1: Removed --inline-links option, added --reference-links option * Markdown and RST readers: + Rewrote to fit new Pandoc definition. Since there are no longer Note or Key blocks, all note and key blocks are parsed on a first pass through the document. Once tables of notes and keys have been constructed, the remaining parts of the document are reassembled and parsed. + Refactored link parsers. * LaTeX and HTML readers: Rewrote to fit new Pandoc definition. Since there are no longer Note or Key blocks, notes and references can be parsed in a single pass through the document. * RST, Markdown, and HTML writers: Rewrote using state monad new Pandoc and definition. State is used to hold lists of references footnotes to and be printed at the end of the document. * RTF and LaTeX writers: Rewrote using new Pandoc definition. (Because of the different treatment of footnotes, the "notes" parameter is no longer needed in the block and inline conversion functions.) * Docbook writer: + Moved the functions 'attributeList', 'inTags', 'selfClosingTag', 'inTagsSimple', 'inTagsIndented' from Text/Pandoc/Shared, since they are now used only by the Docbook writer. + Rewrote using new Pandoc definition. (Because of the different treatment of footnotes, the "notes" parameter is no longer needed in the block and inline conversion functions.) * Updated test suite * Throughout: old haskell98 module names replaced by hierarchical module names, e.g. List by Data.List. * debian/control: Include libghc6-xhtml-dev instead of libghc6-html-dev in "Build-Depends." * cabalize: + Remove haskell98 from BASE_DEPENDS (since now the new hierarchical module names are being used throughout) + Added mtl to BASE_DEPENDS (needed for state monad) + Removed html from GHC66_DEPENDS (not needed since xhtml is now used) git-svn-id: https://pandoc.googlecode.com/svn/trunk@580 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed Blank block element as unnecessary.fiddlosopher2007-03-17
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@578 788f1e2b-df1e-0410-8736-df70ead52e1b
* Pandoc bug fixes:fiddlosopher2006-11-26
| | | | | | | | | | | | | | | | | | | | | | + LaTeX reader did not parse metadata correctly. Now the title, author, and date are parsed correctly, and everything else in the preamble is skipped. + Simplified parsing of LaTeX command arguments and options. The function commandArgs now returns a list of arguments OR options (in whatever order they appear). The brackets are included, and a new stripFirstAndLast function is provided to strip them off when needed. This fixes a problem in dealing with \newcommand, etc. + Added a "try" before "parser" in definition of notFollowedBy' combinator. Adjusted the code using this combinator accordingly. + Changed handling of code blocks. Previously, some readers allowed trailing newlines, while others stripped them. Now, all readers strip trailing newlines in code blocks; writers insert a newline at the end of code blocks as needed. + Changed test suite to reflect these changes. git-svn-id: https://pandoc.googlecode.com/svn/trunk@137 788f1e2b-df1e-0410-8736-df70ead52e1b