summaryrefslogtreecommitdiff
path: root/tests/rst-reader.native
AgeCommit message (Collapse)Author
2017-02-04Moved tests/ -> test/.John MacFarlane
2017-01-25Removed `--normalize` option and normalization functions from Shared.John MacFarlane
* Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
2016-12-07RST reader: fix hyperlink aliases.John MacFarlane
`link <google_>`_ .. _google: https://google.com is really a reference link. Closes #3283.
2016-10-13Parse line-oriented markup as LineBlockAlbert Krewinkel
Markup-features focusing on lines as distinctive part of the markup are read into `LineBlock` elements. This currently means line blocks in reStructuredText and Markdown (the latter only if the `line_block` extension is enabled), the `linegroup`/`line` combination from the Docbook 5.1 working draft, and Org-mode `VERSE` blocks.
2016-06-25Fixed RST links with no explicit link text.John MacFarlane
The link `<foo>`_ should have `foo` as both its link text and its URL. See RST spec at <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases> "The reference text may also be omitted, in which case the URI will be duplicated for use as the reference text. This is useful for relative URIs where the address or file name is also the desired reference text: See `<a_named_relative_link>`_ or `<an_anonymous_relative_link>`__ for details." Closes Debian #828167 -- reported by Christian Heller.
2015-12-13RST reader: image attributesmb21
2015-12-12Test fixes.John MacFarlane
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
2015-08-15RST reader: better handling of indirect roles.John MacFarlane
Previously the parser failed on this kind of case .. role:: indirect(code) .. role:: py(indirect) :language: python :py:`hi` Now it currectly recognizes `:py:` as a code role. The previous test for this didn't work, because the name of the indirect role was the same as the language defined its parent, os it didn't really test for this behavior. Updated test.
2015-08-07Updated tests for link attribute changes.mb21
2015-08-07Updated tests for image attribute changes.John MacFarlane
2014-12-12RST Reader: compute Attrs when role is definedDaniel Bergey
Move recursive role lookup from renderRole to addNewRole. The Attr value will be the same for every occurance of this role, so there's no reason to compute it every time. This allows simplifying the stateRstCustomRoles map considerably. We could go even further, and remove the fmt and attr arguments to renderRole, which are null except for custom roles.
2014-12-12WIP: tests for RST rolesDaniel Bergey
2014-04-30RST reader: Some fixes to last change, and use "author" not "authors".John MacFarlane
(in metadata)
2014-02-15Enhanced Pandoc's support for rST roles.Merijn Verstraaten
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:).
2013-09-01Use registerHeader in RST and LaTeX readers.John MacFarlane
This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
2013-08-16Updated tests for latest pandoc-types changes.John MacFarlane
2013-08-14Updated for removed unMeta, unFormat in pandoc-types.John MacFarlane
2013-08-10Updated tests for new Format.John MacFarlane
2013-06-25Fixed 'authors' metadata parsing in reST.John MacFarlane
Semicolons separate different authors.
2013-06-18RST reader: don't insert paragraphs where docutils doesn't.John MacFarlane
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.
2013-01-13RST reader: Line block improvements.John MacFarlane
* 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 MacFarlane
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-09-30RST reader: Consolidate super/subscript, math into interpretedRole.John MacFarlane
2012-09-30RST reader: Consolidated rawBlock into directive.John MacFarlane
2012-09-27RST reader: Use Text.Pandoc.Builder.John MacFarlane
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 MacFarlane
2012-09-26RST reader: Support :target: on .. image:: blocks.John MacFarlane
Still not supported on substitution definitions.
2012-07-16Don't recognize inline-markup starts inside words.John MacFarlane
For example, "2*2 = 4*1" should not contain an emphasized section. Added test case for "Literal symbols". Closes #569.
2012-03-25Oops! Forgot to munch whitespace / ignore body after directive.Greg Maslov
2012-03-24Add parsing support for the rST default-role directive.Greg Maslov
2012-01-01New treatment of dashes in --smart mode.John MacFarlane
* `---` 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.
2011-12-31Support for math in RST reader and writer.John MacFarlane
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-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane
2011-03-18Changed uri parser so it doesn't include trailing punctuation.John MacFarlane
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.
2011-01-26Add support for attributes in inline Code.John MacFarlane
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.
2011-01-26RST reader: Improved field lists.John MacFarlane
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.
2011-01-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane
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.
2011-01-21Make sure native output ends in newline with --standalone.John MacFarlane
2011-01-20Updated tests for new native format.John MacFarlane
2010-12-08RST reader: Added footnote suppport.John MacFarlane
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.
2010-12-07Made --smart work with RST reader.John MacFarlane
2010-07-20Made spacing at end of output more consistent.John MacFarlane
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.
2010-02-28Added accessors (docTitle, docAuthors, docDate) to Meta type.fiddlosopher
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1853 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27RST reader: Improved grid tables.fiddlosopher
+ 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
2010-02-20Incomplete support for RST tables (simple and grid).fiddlosopher
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
2009-12-31Changed Meta author and date types to Inline lists instead of Strings.fiddlosopher
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
2009-12-07Improved syntax for markdown definition lists.fiddlosopher
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
2009-11-17Support for "..code-block" directive in RST reader.fiddlosopher
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
2009-06-28RST reader: Allow # to continue list...fiddlosopher
...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