summaryrefslogtreecommitdiff
path: root/test/Tests
AgeCommit message (Collapse)Author
2022-08-21Fix typosluz paz
Found via `codespell -q 3 -S changelog.md -L bu,fo,ist,mke,multline,noes,ot,pard,pres,tabl,te,tothe`
2022-07-28DokuWiki reader: support latex plugin and math.John MacFarlane
The `tex_math_dollars` extension is now supported for `dokuwiki` (but off by default). Content inside `<latex>...</latex>` is parsed as raw LaTeX inline, and inside `<LATEX>..</LATEX>` as raw LaTeX block. In addition, this commit changes the behavior of `<php>...</php>` so that instead of producing a code block, it produces raw HTML with `<?php ... ?>`. Closes #8178.
2022-07-16RST writer: Fix missing spaces with nested inlines.John MacFarlane
Previously spaces around links inside italics were omitted. Closes #8182.
2022-07-03Remove Muse reader round-trip tests.John MacFarlane
These are nondeterministic and have repeatedly failed on strange edge cases. The Muse reader's maintainer has not been active, and it isn't worth developer time to chase down these problems.
2022-06-21ConTeXt writer: support complex table structures. (#8116)Albert Krewinkel
The following table feature are now supported in ConTeXt: - colspans, - rowspans, - multiple bodies, - row headers, and - multi-row table head and foot. The wrapping `placetable` environment is also given a `reference` option with the table identifier, enabling referencing of the table from within the document.
2022-06-06ConTeXt writer: use "sectionlevel" environment for headings (#8106)Albert Krewinkel
The document hierarchy is now conveyed using the `\startsectionlevel`/`\stopsectionlevel` by default. This makes it easy to include pandoc-generated snippets in documents at arbitrary levels. The more semantic environments "chapter", "section", "subsection", etc. are used if the `--top-level-division` command line parameter is set to a non-default value. Closes: #5539
2022-06-06Muse tests: do no try to roundtrip strings containing \DEL charAlbert Krewinkel
Fixes: #8108
2022-05-02Org reader: allow attrs for Org tables. (#8049)Brian Leung
Tables with attributes are no longer wrapped in Div elements; attributes are added directly to the table element.
2022-03-08Add tests for idempotency of makeSections.John MacFarlane
See #7950.
2022-02-23Tests: improve location reporting of failing testsAlbert Krewinkel
2022-02-22Fix typos (#7934)Dimitris Apostolou
2022-02-21Org reader: More flexible LaTeX environmentsLucas V. R
Looking at the definition of `org-element-latex-environment-parser`, one sees that Org allows arbitrary arguments to LaTeX environments. In fact, it parses every char just after `\begin{xxx}` until `\end{xxx}` as content for the environment, so all the following examples are valid environments: ```org \begin{equation} e = mc^2 \end{equations} ``` ```org \begin{tikzcd}[ampersand replacement=\&] A \& B \\ C \& D \arrow[from=1-1, to=1-2] \arrow["f", from=2-1, to=2-2] \end{tikzcd} ```
2022-02-11Put id attributes on TOC entries #7907 (#7913)damon-sava-stanley
Naming scheme of id is "toc-" + id of linked to header/section. In Shared, will effect HTML, Markdown, Powerpoint, and RTF.
2022-02-11Add DokuWiki table alignment for #5202 (#7908)damon-sava-stanley
Closes #5202. Within each cell, determine the cell alignment as per https://www.dokuwiki.org/wiki:syntax#tables. The current approach, as per the issue treats the first row's alignment as determining that of the entire column. Given this, it wastes some work in determining an alignment for every cell.
2022-02-06Docbook writer: Interpret links without contents as cross-references (#7360)Jan Tojnar
Links without text contents are converted to `<xref>` elements. DocBook processors will generate appropriate cross-reference text when presented with an xref element.
2022-02-04Add endnotexml reader test.John MacFarlane
2022-02-04Add mendeley citation tests.John MacFarlane
2022-02-03Add zoreto test with +citations.John MacFarlane
So far, though, we still don't include the references in the metadata.
2022-02-03Add zotero citation test with docx-citations.John MacFarlane
2022-01-29Use `[x]` not `[X]` for asciidoctor checklists.John MacFarlane
See #7798.
2022-01-21Fix compiler warnings.John MacFarlane
2022-01-21Update command tests to distinguish stderr and test exit status.John MacFarlane
2022-01-18Docx writer: Separate tables even with RawBlocks between (#7844)Michael Hoffmann
Adjacent docx tables need to be separated by an empty paragraph. If there's a RawBlock between tables which renders to nothing, be sure to still insert the empty paragraph so that they will not collapse together. Fixes #7724
2022-01-16Support checklists in asciidoctor writer (#7832)Nikolai Korobeinikov
The checklist syntax (similar to `task_list` in markdown) seems to be an asciidoctor-only addition. Co-authored-by: ricnorr <ricnorr@yandex-tream.ru>
2022-01-11Docx writer: Handle bullets correctly in lists by not reusing numIds (#7822)Michael Hoffmann
Make sure that we only create one bullet per list item in docx. In particular, when a div is a list item, its contained paragraphs will now no longer wrongly get individual bullets. This is accomplished by making sure that for each list, we only use the associated numId once. Any repeated use would add incorrect bullets to the document. Closes #7689
2022-01-09Org reader: support alphabetical (fancy) listsLucas Viana
This adds support for alphabetical lists in org by enabling the extension Ext_fancy_lists, mimicking the behaviour of Org Mode when org-list-allow-alphabetical is enabled. Enabling Ext_fancy_lists will also make Pandoc differentiate between the delimiters of ordered lists (periods or closing parentheses). Org does this differentiation by default when exporting to some formats (e.g. plain text) but does not in others (e.g. html and latex), so I decided to copy Pandoc's markdown reader behaviour.
2022-01-07Org writer: support starting number cookiesLucas Viana
This complements #7806 by supporting writing Org ordered lists that start at a specific number.
2022-01-06Org reader: support counter cookies in listsLucas Viana
This adds support for counter cookies in org lists. Such cookies are used to override the item counter in ordered lists. In org it is possible to set the counter at any list item, but since Pandoc AST does not support this, we restrict the usage to setting an offset for the entire ordered list, by using the cookie in the first list item. Note that even though unordered lists do not have counters, Org Mode still parses such cookies in unordered lists and suppresses them in the output, so we do the same. Also, even though org-list-allow-alphabetical is disabled in Emacs by default, for some reason alphabetical cookies are always parsed and used in Org Mode regardlessly of whether this option is enabled or the list style is decimal, so we do the same. E.g. 2. test 3. test Is parsed as an ordered list starting at 1, as before. This also conforms to Org Mode behaviour. 1. [@2] test 2. test Is now parsed as an ordered list starting at 2, so that it conforms to Org Mode behaviour. Note that when parsing 1. [@2] test 2. [@9] test the second cookie is silenced and the entire list starts at 2. This is because the current Pandoc AST does not support expressing a change in the counter at a specific item.
2022-01-04Lua: add `pandoc.template` moduleAlbert Krewinkel
The module provides a `compile` function to use strings as templates.
2022-01-04Lua: add `pandoc.WriterOptions` constructorAlbert Krewinkel
2022-01-02Odt: Add list-headerTuong Nguyen Manh
The list-header is a type of list-item. Therefore, it will be treated exactly like one.
2022-01-02Copyright notices: update for 2022Albert Krewinkel
2022-01-01Org reader: allow trailing spaces after key/value pairs in directivesAlbert Krewinkel
Ensures that spaces at the end of attribute directives like `#+ATTR_HTML: :width 100%` (note the trailing spaces) are accepted.
2021-12-22HTML writer: make line breaks more consistent.John MacFarlane
- With `--wrap=none`, we now output line breaks between block-level elements. Previously they were omitted entirely, so the whole document was on one line, unless there were literal line breaks in pre sections. This makes the HTML writer's behavior more consistent with that of other writers. - Put newline after `<dd>`. - Put newlines after block-level elements in footnote section.
2021-12-20Lua: use more natural representation for Reference valuesAlbert Krewinkel
Omit `false` boolean values, push integers as numbers.
2021-12-19Add a writer for Markua 0.10 (#7729)binaarinen
Markua is a markdown variant used by Leanpub. More information about Markua can be found at https://leanpub.com/markua/read. Adds a new exported function `writeMarkua` from T.P.Writers.Markdown. [API change] Closes #1871. Co-authored by Tim Wisotzki and Samuel Lemmenmeier.
2021-12-14Org reader: parse official org-cite citations.John MacFarlane
We also support the older org-ref style as a fallback. We no longer support the "markdown-style" citations. See #7329.
2021-12-14Org reader: remove support for "Berkeley style" citations.John MacFarlane
See #7329.
2021-12-11fix(IpynbOutput)!: rank always favors output formatKolen Cheung
Previously, both `fmt == f` case and Image have a rank of 1. In the end, e.g. from ipynb to html conversion, if both html and image exists, it actually prefers the image. This commit changes this, so that fmt == f is always highest rank, and rank never collides. This is achieved by keeping fmt == f case having rank 1, and every other rank increased by 1.
2021-12-10Lua tests: remove roundtrip testsAlbert Krewinkel
Property tests that roundtrip elements through the Lua stack are performed in the test-suite of the pandoc-lua-marshal package. No need to test this here as well.
2021-12-10Powerpoint tests: shorten lines by grouping testsAlbert Krewinkel
This makes the test output more pleasant to read in narrow terminal windows.
2021-12-09ipynb writer: handle cell output with raw block of markdown (#7563)Kolen Cheung
Write RawBlock of markdown in code-cell output. #7561 makes the ipynb reader reads code-cell output with mime "text/markdown" to a RawBlock of markdown This commit makes the ipynb writer writes this RawBlock of markdown back inside a code-cell output with the same mime, preserving this information in round-trip Add tests of ipynb reader (#7561) and ipynb writer (#7563)'s ability to handle a "text/markdown" mime type in a code-cell output
2021-11-27Lua: use package pandoc-lua-marshal (#7719)Albert Krewinkel
The marshaling functions for pandoc's AST are extracted into a separate package. The package comes with a number of changes: - Pandoc's List module was rewritten in C, thereby improving error messages. - Lists of `Block` and `Inline` elements are marshaled using the new list types `Blocks` and `Inlines`, respectively. These types currently behave identical to the generic List type, but give better error messages. This also opens up the possibility of adding element-specific methods to these lists in the future. - Elements of type `MetaValue` are no longer pushed as values which have `.t` and `.tag` properties. This was already true for `MetaString` and `MetaBool` values, which are still marshaled as Lua strings and booleans, respectively. Affected values: + `MetaBlocks` values are marshaled as a `Blocks` list; + `MetaInlines` values are marshaled as a `Inlines` list; + `MetaList` values are marshaled as a generic pandoc `List`s. + `MetaMap` values are marshaled as plain tables and no longer given any metatable. - The test suite for marshaled objects and their constructors has been extended and improved. - A bug in Citation objects, where setting a citation's suffix modified it's prefix, has been fixed.
2021-11-19Lua tests: reset path and cpath when testing 'require' fallback.John MacFarlane
2021-11-18RST reader: handle class attribute for for custom roles (#7700)willj-dev
Previously the class attribute was ignored, and the name of the role used as the class. Closes #7699.
2021-11-17Lua: set `lpeg`, `re` as globals; allow shared lib access via requireAlbert Krewinkel
The `lpeg` and `re` modules are loaded into globals of the respective name, but they are not necessarily registered as loaded packages. This ensures that - the built-in library versions are preferred when setting the globals, - a shared library is used if pandoc has been compiled without `lpeg`, and - the `require` mechanism can be used to load the shared library if available, falling back to the internal version if possible and necessary.
2021-11-12JATS writer: ensure figures are wrapped with `<p>` in list items.Albert Krewinkel
This prevents the generation of invalid output.
2021-11-11Writers.Shared: Improve toLegacyTable.Christian Despres
Closes #7683. (PR #7684)
2021-11-08Lua: ensure that 're' module is always available.Albert Krewinkel
The module is shipped with LPeg.
2021-10-22Org reader: allow an initial :PROPERTIES: drawer to add to metadata.John MacFarlane
Closes #7520.