aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-09-06Add prefixes to identifiers with `--file-scope`.multifileJohn MacFarlane
This change only affects the case where `--file-scope` is used and more than one file is specified on the command line. In this case, identifiers will be prefixed with a string derived from the file path, to disambiguate them. For example, an identifier `foo` in `contents/file1.txt` will become `contents__file1.txt__foo`. Links will be adjusted accordingly: if `file2.txt` links to `file1.txt#foo`, then the link will be changed to point to `#file1.txt__foo`. Similarly, a link to `file1.txt` will point to `#file1.txt`. A Div with an identifier derived from the file path will be added around each file's content, so that links to files will still work. Closes #6384. [API change]: Text.Pandoc.Shared exports `textToIdentifier`.
2022-09-05HTML writer: only treat `. . .` as a slide pause in slides...John MacFarlane
...and not in regular HTML output. Closes #8281.
2022-09-01Use dev version of gridtablesAlbert Krewinkel
This allows to specify a table foot by enclosing it with part separator lines, i.e., row separator lines consisting only of `+` and `=` characters. E.g.: +------+-------+ | Item | Price | +======+=======+ | Eggs | 5£ | +------+-------+ | Spam | 3£ | +======+=======+ | Sum | 8£ | +======+=======+ The last row, containing "Sum" and "8£", is the table foot. Closes: #8257
2022-08-31RTF writer: add space after unicode escape commands.John MacFarlane
Otherwise the `?` character that is there as a fallback for systems that can't process the unicode will be interpreted as the paramater's delimiter, and the NEXT character will be gobbled instead of `?`. Closes #8264 (fixes a problem with disappearing characters after unicode escapes).
2022-08-30Mediawiki reader: Parse table cell with attribs, to support rowspan, colspan ↵Ruqi
(#8231)
2022-08-27HTML, Markdown writers: filter out empty class attributes.John MacFarlane
These should not be generated by any pandoc readers, but they might be produced programatically. Technically that's a misuse of the AST, but since the expectation that the classes are nonempty strigs is not encoded in the types, it can happen. This patch limits the damage if it does, preventing invalid markdown attributes like `{.}` from being written. Cloess #8251.
2022-08-25Markdown reader: fenced code block shortcuts with attributes (#8174)Siphalor
This allows the combination of the fenced code block shortcut form with attributes: ```` ```haskell {.class #id} ``` ```` The code syntax class will be combined with the attribute classes. This syntax allows for more intuitive writing and for better compatibility with other Markdown parsers such as GitHub or Codeberg. Closes #8174.
2022-08-24LaTeX reader: handle `##` macro arguments properly.John MacFarlane
These turn into regular `#` arguments when expanded. Closes #8243.
2022-08-22HTML writer: revert to using `width` property for column widthsAlbert Krewinkel
The default `flex` and `overflow-x` properties of a column are set to `auto`. In combination, these changes allow to get good results when using columns with or without explicit widths.
2022-08-22Org writer: add support for jupyter nodebook cells.Albert Krewinkel
Closes: #6367
2022-08-22Org writer: keep code block attributes as header args.Albert Krewinkel
This allows to keep more information in the resulting `src` blocks, making it easier to roundtrip from or through Org. Org babel ignores unknown header arguments.
2022-08-22Org writer: add code block identifier as `#+name` to src blocks.Albert Krewinkel
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-08-21Org reader: treat *emacs-jupyter* src blocks as code cells.Albert Krewinkel
This improves support for notebook-like org files that are intended to be used with emacs-jupyter package. Closes: #8236
2022-08-18HTML writer: use `flex` property for column widthsAlbert Krewinkel
Fixes: #8232
2022-08-17Org reader: treat "abstract" block as metadataAlbert Krewinkel
A block of type "abstract" is assumed to define the document's abstract. It is transferred from the main text to the metadata. Closes: #8204
2022-08-17Org template: add abstract from metadata as block of type "abstract"Albert Krewinkel
See #8204.
2022-08-17LaTeX writer: add label to tables that have an identifierAlbert Krewinkel
Tables with an identifier are marked with a `\label`. A caption is always included in this case, even if the caption is empty. Closes: #8219
2022-08-07LaTeX writer: fix widths of multicolumn cellsAlbert Krewinkel
Fixes: #8218
2022-08-05Use dev version of gridtables.Albert Krewinkel
Closes: #8216
2022-08-03Improve default CSS for task lists.John MacFarlane
This ensures that there is a space between the checkbox and the following content and that subsequent content lines up. Closes #8151. Supersedes and closes #8163.
2022-08-03HTML reader: allow sublists that are not marked as items.Albert Krewinkel
The HTML standard requires all list items to be marked with a `<li>` tag, but some tools fail to do so for sublists. The reader now accepts these unwrapped lists as sublists. Closes: #8150
2022-08-03Org reader: add missing `/` to Windows file URI; fixes prev commitAlbert Krewinkel
2022-08-02Org reader: recognize absolute paths on WindowsAlbert Krewinkel
Fixes: #8201
2022-08-01HTML: use CSS flex boxes for columns.Albert Krewinkel
This allows to render an arbitrary number of columns, while the previous approach assumed exactly two columns.
2022-08-01Markdown reader: allow special span classes in any positionAlbert Krewinkel
2022-08-01Markdown reader: allow more attributes in special spansAlbert Krewinkel
Spans with "smallcaps" as the first class are converted to *SmallCaps* elements. While previously no other classes or attributes were allowed, additional classes, attributes, and an identifier are not permitted and kept in a *SmallCaps* wrapping *Span* element. The same change is applied to underline spans, where the first class must be either "ul" or "underline". Closes: #4102
2022-07-31Fix tests for d2bd9abc4d5e9b6b4a6414fd010cdb5995f32935John MacFarlane
2022-07-30Support rowspans and colspans in grid tables (#8202)Albert Krewinkel
* Add tests for zero-width and fullwidth chars in grid tables * T.P.Parsing: simplify `gridTableWith'`, `gridTableWith` [API Change] The functions `gridTableWith` and `gridTableWith'` no longer takes a boolean argument that toggles whether a table head should be parsed: both, tables with heads and without heads, are always accepted now. * Support colspans, rowspans, and multirow headers in grid tables. Grid tables in Markdown, reStructuredText, and Org can now contain cells spanning over multiple columns and/or multiple rows; table headers containing multiple rows are supported as well. Note: the markdown writer does not yet support these more complex grid table features.
2022-07-30Add tests for zero-width and fullwidth chars in grid tablesAlbert Krewinkel
2022-07-28MediaWiki reader: allow HTML comment after row start.John MacFarlane
Closes #8110.
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-25HTML writer: Allow "spanlike" classes to be combined.John MacFarlane
Previously classes like "underline" and "marked" had to be the first class in a span in order for the span to be interpreted as a "ul" or "mark" element. This commit allows these special classes to be "stacked," e.g. `[test]{.mark .underline}`; in addition, the special classes are no longer required to come first in the list of classes. See #8194 for context.
2022-07-25Test for #5795: remove redundant 'dfn' classesJohn MacFarlane
2022-07-18Unescape characters in `\lstinline` inside `\passthrough`.John MacFarlane
For full motivation, see #1629 ; this improves on 99e24cf18337b0b460005bf77e367783c34b75e7. Closes #8179.
2022-07-16RST writer: Fix missing spaces with nested inlines.John MacFarlane
Previously spaces around links inside italics were omitted. Closes #8182.
2022-07-12ms template: redefine rather than removing .CH macro.John MacFarlane
This responds to feedback in #8175.
2022-07-11Use latest dev citeprocJohn MacFarlane
2022-07-07RTF reader: support `\nosupersub`.John MacFarlane
Closes #8170.
2022-07-06Use `formatCode` from #7525 in HTML and MediaWiki (#8162)Elliot Bobrow
Move formatting from inside inline code elements to the outside in order to retain formatting.
2022-07-04Ensure that Nulls are ignored in creating slide shows.John MacFarlane
Also ensure that Nulls are ignored in sectionification by `makeSections`. Closes #8155.
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-23Remove extra soft break for tasklist (#8142)black-desk
Browser will display the extra newline character between checkbox and text as a space, which make tasklist items cannot be aligned. I just remove it.
2022-06-22Ensure that metadata values w/o trailing newlines are...John MacFarlane
parsed as inlines, as the manual states. Previously, they were parsed as inlines if they would otherwise have been a single Plain or Para, but otherwise left unchanged. This led to some quirky results (e.g. #8143). We now use the general function `blocksToInlines` from T.P.Shared.
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-20LaTeX: Handle formatted text inside code inline (#8129)Elliot Bobrow
Add `formatCode` function to Text.Pandoc.Shared [API change]. Use this in the LaTeX reader so that e.g. `\texttt{\textbf{bold code}}` is parsed as `Strong [Code ("",[],[]) "bold code"]`.
2022-06-13LaTeX reader: improve mathEnvWith.John MacFarlane
When converting e.g. an align environment to an aligned environment inside a Math element, we need to include a newline before the `\end{aligned}`, since the previous line might end in a comment. Closes #8122.
2022-06-10TikiWiki: support underlined textAlbert Krewinkel
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