aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
AgeCommit message (Collapse)AuthorFilesLines
2014-04-24Org reader: Recognize plain and angle linksAlbert Krewinkel1-0/+14
This adds support for plain links (like http://zeitlens.com) and angle links (like <http://moltkeplatz.de>).
2014-04-19Org reader: Allow for compact definition listsAlbert Krewinkel1-0/+12
Use `Text.Pandoc.Shared.compactify'DL` to allow for compact definition lists.
2014-04-19Org reader: Fix parsing of footnotesAlbert Krewinkel1-0/+42
Footnotes can consist of multiple blocks and end only at a header or at the beginning of another footnote. This fixes the previous behavior, which restricted notes to a single paragraph.
2014-04-19Org reader: Apply captions to code blocks and tablesAlbert Krewinkel1-1/+30
The `Table` blocktype already takes the caption as an argument, while code blocks are wrapped in a `Div` block together with a labelling `Span`.
2014-04-18Org reader: Add support for plain LaTeX fragmentsAlbert Krewinkel1-1/+19
This adds support for LaTeX fragments like the following: ``` \begin{equation} \int fg \mathrm{d}x \end{equation} ```
2014-04-18Org reader: Fix parsing of loose listsAlbert Krewinkel1-5/+16
Loose lists (i.e. lists with blankline separated items), were parsed as multiple lists, each containing a single item. This patch fixes this issue.
2014-04-17Org reader: Support more types of '#+BEGIN_<type>' blocksAlbert Krewinkel1-23/+74
Support for standard org-blocks is improved. The parser now handles "HTML", "LATEX", "ASCII", "EXAMPLE", "QUOTE" and "VERSE" blocks in a sensible fashion.
2014-04-17Org reader: Support footnotesAlbert Krewinkel1-0/+4
2014-04-13Merge pull request #1239 from tarleb/org-linebreakJohn MacFarlane1-0/+4
Org linebreaks
2014-04-12Org reader: Read linebreaksAlbert Krewinkel1-0/+4
Linebreaks are marked by the string `\\` at the end of a line.
2014-04-12Org reader: Add support for figuresAlbert Krewinkel1-0/+21
Support for figures (images with name and caption) is added.
2014-04-11Org reader: Fix parsing of sub-/superscript expressionsAlbert Krewinkel1-9/+30
This fixes the org-reader's handling of sub- and superscript expressions. Simple expressions (like `2^+10`), expressions in parentheses (`a_(n+1)`) and nested sexp (like `a_(nested()parens)`) are now read correctly.
2014-04-10Org reader: Support more inline/display math variantsAlbert Krewinkel1-6/+30
Support all of the following variants as valid ways to define inline or display math inlines: - `\[..\]` (display) - `$$..$$` (display) - `\(..\)` (inline) - `$..$` (inline) This closes #1223. Again.
2014-04-09Org reader: Precise rules for the recognition of markupAlbert Krewinkel1-2/+23
The inline parsers have been rewritten using the org source code as a reference. This fixes a couple of bugs related to erroneous markup recognition.
2014-04-07Org reader: Support inline math (like $E=mc^2$)Albert Krewinkel1-0/+4
Closes #1223.
2014-04-06Org reader: Add support for definition listsAlbert Krewinkel1-3/+23
2014-04-05Org reader: Support inline imagesAlbert Krewinkel1-2/+10
2014-04-05Org reader: Fix parsing of nested inlinesAlbert Krewinkel1-0/+4
Text such as /*this*/ was not correctly parsed as a strong, emphasised word. This was due to the end-of-word recognition being to strict as it did not accept markup chars as part of a word. The fix involves an additional parser state field, listing the markup chars which might be parsed as part of a word.
2014-03-04Add a simple Emacs Org-mode readerAlbert Krewinkel1-0/+533
The basic structure of org-mode documents is recognized; however, org-mode features like todo markers, tags etc. are not supported yet.
2013-12-19HLint: redundant parensHenry de Valence2-3/+3
Remove parens enclosing a single element.
2013-11-22Fixed bug with intraword emphasis.John MacFarlane1-0/+5
Closes #1066.
2013-09-01Markdown reader: Don't autolink a bare URI that is followed by `</a>`.John MacFarlane1-1/+4
Closes #937.
2013-09-01Use registerHeader in RST and LaTeX readers.John MacFarlane1-5/+5
This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
2013-08-22Write id for code block to label attr in latex when listing is usedFlorian Eitel1-0/+7
The code: ~~~{#test} asdf ~~~ gets compiled to html: <pre id="test"> asdf </pre> So it is possible to link to the identifier `test` But this doesn't happen on latex When using the listings package (`--listings`) it is possible to set the identifier using the `label=test` property: \begin{lstlisting}[label=id] hi \end{lstlisting} And this is exactly what this patch is doing. Modified LaTeX Reader/Writer and added tests for this.
2013-07-21LaTeX reader: Don't add spurious ", " to citation suffixes.John MacFarlane1-18/+18
This is added when needed in Text.Pandoc.Biblio anyway.
2013-06-24Use new flexible metadata type.John MacFarlane1-11/+23
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-19Added test for #882.John MacFarlane1-0/+5
2013-03-17Revert "LaTeX reader: citation handling changes."John MacFarlane1-8/+2
This reverts commit f7229b147314042f946dfded3b441ab0fae260a0.
2013-03-09LaTeX reader: citation handling changes.John MacFarlane1-2/+8
Previously, a LaTeX citation would always be parsed as a Citation element, with the raw LaTeX in the [Inline] part. Now, the LaTeX citation is parsed as a Citation element only if `--biblio` was specified (i.e. only if there is a nonempty set of references in readerReferences). Otherwise it is parsed as raw LaTeX. This will make it possible to simplify some things in the markdown writer. It also makes the LaTeX reader behave more like the Markdown reader.
2013-01-23Eliminated use of TH in test suite.John MacFarlane2-20/+19
2013-01-15Changed Ext_autolink_urls -> Ext_autolink_bare_uris.John MacFarlane1-1/+1
Added tests.
2013-01-15Added lots of tests for bare URIs.John MacFarlane1-0/+91
2013-01-13RST reader: Line block improvements.John MacFarlane1-2/+2
* Use nonbreaking spaces for initial indent (otherwise lost in HTML and LaTeX). * Allow multiple paragraphs in a single line block.
2012-10-28Removed citationSuppressParens.John MacFarlane1-1/+1
Makefile: Use citeproc-0.3.6 release.
2012-10-22LaTeX reader: Initialize citationSuppressParens field.John MacFarlane1-1/+2
2012-10-21Revert "LaTeX reader: Use new suppressParens option for footnote citations."John MacFarlane1-7/+6
This reverts commit 7499499b68934ae6f3418940328c7fc2bd9fcadd. Conflicts: src/Text/Pandoc/Readers/LaTeX.hs
2012-10-15LaTeX reader: Use new suppressParens option for footnote citations.John MacFarlane1-6/+7
Also changed Biblio, Markdown reader, and LaTeX reader tests because of new citationSuppressParens field in Citation.
2012-09-22Markdown reader: Fixed link parser to avoid exponential slowdowns.John MacFarlane1-0/+2
Previously the parser would hang on input like this: [[[[[[[[[[[[[[[[[[hi We fixed this by making the link parser parser characters between balanced brackets (skipping brackets in inline code spans), then parsing the result as an inline list. One change is that [hi *there]* bud](/url) is now no longer parsed as a link. But in this respect pandoc behaved differently from most other implementations anyway, so that seems okay. All current tests pass. Added test for this case. Closes #620.
2012-09-22LaTeX reader: Added a 'try' in rawLaTeXBlock.John MacFarlane1-0/+4
This allows the markdown reader to treat '\begin' (not followed by an argument) as a raw string rather than erroring out when it doesn't find a '{'. Closes #622.
2012-08-08Changes to literate haskell options.John MacFarlane1-1/+3
- 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-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-1/+1
2012-07-26Moved tests to tests/, modified cabal file so lib isn't recompiled.John MacFarlane3-0/+336
2011-01-29Moved tests to src.John MacFarlane3-227/+0
2011-01-29Added biblatex citation tests to Tests.Readers.LaTeX.John MacFarlane1-2/+45
Removed old biblatex-citations.latex.
2011-01-29Added natbib citation tests to Tests.Readers.LaTeX.John MacFarlane1-0/+65
Removed old tests/natbib-citations.latex.
2011-01-26Added Tests.Readers.Markdown.John MacFarlane1-0/+29
2011-01-26RST reader: Improved field lists.John MacFarlane1-11/+11
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-26Added RST reader tests.John MacFarlane1-0/+46
2011-01-22Removed deliberate error in LaTeX reader tests.John MacFarlane1-1/+1
2011-01-22Fixed -Wall error in imports.John MacFarlane1-1/+1