summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
Commit message (Collapse)AuthorAge
* Track changes tests.Jesse Rosenthal2014-06-25
|
* Docx reader: Add tests for basic track changesJesse Rosenthal2014-06-25
| | | | | | | This is what seems like the sensible default: read in insertions, and ignore deletions. In the future, it would be good if options were available for either taking in deletions or keeping both in some scriptable format.
* Docx Reader: add failing defintion list tests.Jesse Rosenthal2014-06-24
|
* Docx reader: add failing tests for inline code and code blocks.Jesse Rosenthal2014-06-24
|
* Add test for correctly trimming spaces in formatting.Jesse Rosenthal2014-06-23
| | | | | This used to be fixed in the tree-walking. We need to make sure we're doing it right now.
* Docx reader tests: add tests for normalization deep in blocks.Jesse Rosenthal2014-06-22
|
* Add normalization test.Jesse Rosenthal2014-06-22
| | | | | | | | Add torture-test for new normalization functions. One problem that this test demonstrates is that word has a tendency to turn off formatting at a space, and then turn it back on after. I'm not sure yet whether this is something we should fix.
* Docx reader tests: Introduce NoNormPandoc type.Jesse Rosenthal2014-06-20
| | | | | | | This is just a wrapper around Pandoc that doesn't normalize with `toString`. We want to make sure that our own normalization process works. If, in the future, we are able to hook into the builder's normalization, this will be removed.
* Add tabs tests.Jesse Rosenthal2014-06-19
|
* Add ReaderOptions to the docx testsJesse Rosenthal2014-06-19
| | | | | This will allow for testing different media embedding (in addition to any other applicable options.)
* Naming: Use Docx instead of DocX.John MacFarlane2014-06-16
| | | | For consistency with the existing writer.
* Merge branch 'docx' of https://github.com/jkr/pandoc into jkr-docxJohn MacFarlane2014-06-16
|\
| * Add DocX automated tests.Jesse Rosenthal2014-06-16
| | | | | | | | Note this makes use of input and output files in the tests/ dir.
* | Org reader: make tildes create inline code.John MacFarlane2014-06-16
|/ | | | | | | | | | Closes #1345. Also relabeled 'code' and 'verbatim' parsers to accord with the org-mode manual. I'm not sure what the distinction between code and verbatim is supposed to be, but I'm pretty sure both should be represented as Code inlines in pandoc. The previous behavior resulted in the text not appearing in any output format.
* Org reader: support for inline LaTeXAlbert Krewinkel2014-05-20
| | | | | | Inline LaTeX is now accepted and parsed by the org-mode reader. Both, math symbols (like \tau) and LaTeX commands (like \cite{Coffee}), can be used without any further escaping.
* Org reader: support Pandocs citation extensionAlbert Krewinkel2014-05-14
| | | | | | | | | | | | | | | Citations are defined via the "normal citation" syntax used in markdown, with the sole difference that newlines are not allowed between "[...]". This is for consistency, as org-mode generally disallows newlines between square brackets. The extension is turned on by default and can be turned off via the default syntax-extension mechanism, i.e. by specifying "org-citation" as the input format. Move `citeKey` from Readers.Markdown into Parsing The function can be used by other readers, so it is made accessible for all parsers.
* Org reader: Fix block parameter reader, relax constraintsAlbert Krewinkel2014-05-10
| | | | | | | | | The reader produced wrong results for block containing non-letter chars in their parameter arguments. This patch relaxes constraints in that it allows block header arguments to contain any non-space character (except for ']' for inline blocks). Thanks to Xiao Hanyu for noticing this.
* Org reader: Fix parsing of blank lines within blocksAlbert Krewinkel2014-05-09
| | | | | Blank lines were parsed as two newlines instead of just one. Thanks to Xiao Hanyu (@xiaohanyu) for pointing this out.
* Org reader: Support arguments for code blocksAlbert Krewinkel2014-05-09
| | | | | | | | | | The general form of source block headers (`#+BEGIN_SRC <language> <switches> <header arguments>`) was not recognized by the reader. This patch adds support for the above form, adds header arguments to the block's key-value pairs and marks the block as a rundoc block if header arguments are present. This closes #1286.
* Org reader: Read inline code blocksAlbert Krewinkel2014-05-06
| | | | | | | | | | | Org's inline code blocks take forms like `src_haskell(print "hi")` and are frequently used to include results from computations called from within the document. The blocks are read as inline code and marked with the special class `rundoc-block`. Proper handling and execution of these blocks is the subject of a separate library, rundoc, which is work in progress. This closes #1278.
* Added test for #1154.John MacFarlane2014-05-04
|
* Org reader: Add support for custom link typesAlbert Krewinkel2014-05-01
| | | | | | | | | | | Org allows users to define their own custom link types. E.g., in a document with a lot of links to Wikipedia articles, one can define a custom wikipedia link-type via #+LINK: wp https://en.wikipedia.org/wiki/ This allows to write [[wp:Org_mode][Org-mode]] instead of the equivallent [[https://en.wikipedia.org/wiki/Org_mode][Org-mode]].
* Org reader: Enable internal linksAlbert Krewinkel2014-04-25
| | | | | | | | | Internal links in Org are possible by using an anchor-name as the target of a link: [[some-anchor][This]] is an internal link. It links <<some-anchor>> here.
* Org reader: Recognize plain and angle linksAlbert Krewinkel2014-04-24
| | | | | This adds support for plain links (like http://zeitlens.com) and angle links (like <http://moltkeplatz.de>).
* Org reader: Allow for compact definition listsAlbert Krewinkel2014-04-19
| | | | | Use `Text.Pandoc.Shared.compactify'DL` to allow for compact definition lists.
* Org reader: Fix parsing of footnotesAlbert Krewinkel2014-04-19
| | | | | | 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.
* Org reader: Apply captions to code blocks and tablesAlbert Krewinkel2014-04-19
| | | | | The `Table` blocktype already takes the caption as an argument, while code blocks are wrapped in a `Div` block together with a labelling `Span`.
* Org reader: Add support for plain LaTeX fragmentsAlbert Krewinkel2014-04-18
| | | | | | | | | | This adds support for LaTeX fragments like the following: ``` \begin{equation} \int fg \mathrm{d}x \end{equation} ```
* Org reader: Fix parsing of loose listsAlbert Krewinkel2014-04-18
| | | | | | Loose lists (i.e. lists with blankline separated items), were parsed as multiple lists, each containing a single item. This patch fixes this issue.
* Org reader: Support more types of '#+BEGIN_<type>' blocksAlbert Krewinkel2014-04-17
| | | | | | Support for standard org-blocks is improved. The parser now handles "HTML", "LATEX", "ASCII", "EXAMPLE", "QUOTE" and "VERSE" blocks in a sensible fashion.
* Org reader: Support footnotesAlbert Krewinkel2014-04-17
|
* Merge pull request #1239 from tarleb/org-linebreakJohn MacFarlane2014-04-13
|\ | | | | Org linebreaks
| * Org reader: Read linebreaksAlbert Krewinkel2014-04-12
| | | | | | | | Linebreaks are marked by the string `\\` at the end of a line.
* | Org reader: Add support for figuresAlbert Krewinkel2014-04-12
|/ | | | Support for figures (images with name and caption) is added.
* Org reader: Fix parsing of sub-/superscript expressionsAlbert Krewinkel2014-04-11
| | | | | | | 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.
* Org reader: Support more inline/display math variantsAlbert Krewinkel2014-04-10
| | | | | | | | | | | | Support all of the following variants as valid ways to define inline or display math inlines: - `\[..\]` (display) - `$$..$$` (display) - `\(..\)` (inline) - `$..$` (inline) This closes #1223. Again.
* Org reader: Precise rules for the recognition of markupAlbert Krewinkel2014-04-09
| | | | | | 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.
* Org reader: Support inline math (like $E=mc^2$)Albert Krewinkel2014-04-07
| | | | Closes #1223.
* Org reader: Add support for definition listsAlbert Krewinkel2014-04-06
|
* Org reader: Support inline imagesAlbert Krewinkel2014-04-05
|
* Org reader: Fix parsing of nested inlinesAlbert Krewinkel2014-04-05
| | | | | | | | 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.
* Add a simple Emacs Org-mode readerAlbert Krewinkel2014-03-04
| | | | | The basic structure of org-mode documents is recognized; however, org-mode features like todo markers, tags etc. are not supported yet.
* HLint: redundant parensHenry de Valence2013-12-19
| | | | Remove parens enclosing a single element.
* Fixed bug with intraword emphasis.John MacFarlane2013-11-22
| | | | Closes #1066.
* Markdown reader: Don't autolink a bare URI that is followed by `</a>`.John MacFarlane2013-09-01
| | | | Closes #937.
* Use registerHeader in RST and LaTeX readers.John MacFarlane2013-09-01
| | | | | This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
* Write id for code block to label attr in latex when listing is usedFlorian Eitel2013-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* LaTeX reader: Don't add spurious ", " to citation suffixes.John MacFarlane2013-07-21
| | | | This is added when needed in Text.Pandoc.Biblio anyway.
* Use new flexible metadata type.John MacFarlane2013-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Added test for #882.John MacFarlane2013-06-19
|