aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-10-19Split Text.Pandoc.Version from Text.Pandoc.Shared.John MacFarlane
This new module exports `pandocVersion` and `pandocVersionText`, which are no longer exported from Text.Pandoc.Shared. [API change] Also, we now set the `pandoc-version` variable centrally rather than in the writers. One effect is the man writer now emits a comment with the pandoc version (this was intended before, judging from the template, but it didn't happen because the vairable wasn't set).
2022-10-18Revert "HTML reader: avoid duplicating any existing identifier..."John MacFarlane
This reverts commit e5fbddd3b6c0c7a3b76b313edbe55242e3b138fc.
2022-10-18Revert "Markdown reader: avoid duplicate ids with auto_identifiers."John MacFarlane
This reverts commit eff82cfe4de44a111250ce9ce3ecee2fd4d99924.
2022-10-18Markdown reader: avoid duplicate ids with auto_identifiers.John MacFarlane
We previously avoided generating a duplicate with another automatically generated identifier; now we also avoid duplicates with explicit identifiers that occur before the header for which an identifier is being generated. (Collisions are still possible for identifiers that occur after the header.) T.P.Shared: `makeSections` is also modified so it doesn't give bad results when the enclosing Div has a different identifier from the header, as may now happen.
2022-10-18HTML reader: avoid duplicating any existing identifier...John MacFarlane
with `auto_identifiers`. Closes #8383.
2022-10-17Adjust tests for CSS change; add CSS comments to mark...John MacFarlane
highlighting CSS and citations CSS in the source.
2022-10-16RST writer: improve inline escaping rules.John MacFarlane
Also a small performance optimization. Closes #8380.
2022-10-13Rollback parameterize options on scripting engine.John MacFarlane
Rolls back 0ab014ed1e5890e338792fab98aecc45cd889f99. We don't need this because we aren't needing to print the Lua version in options any more; we're handling `--version` now at the pandoc-cli level.
2022-10-10Org reader: make #+pandoc-emphasis-pre work as expected. (#8360)Amir Dekel
So far, `orgStateLastPreCharPos` wasn't updated appropriately after each parsing to native Str (by the parser `str`). In addition to solving this, the guard `notAfterString` in `emphasisStart` is removed to allow emphasis after Str at the first place.
2022-10-08Use texmath 0.12.5.4.John MacFarlane
2022-10-06LaTeX writer: add separator line between table's body and its foot.Albert Krewinkel
The writer uses features from the longtable package to define the table foot. Furthermore, the table's bottom rule is now part of the foot, where it previously was given as part of the body.
2022-10-06latex template: set fonts after Beamer themeJeremie Knuesel
Beamer themes such as metropolis and saintpetersburg change the default fonts. This change gives precedence to the user font settings by moving them after the loading of the Beamer theme.
2022-10-05HTML writer: replace deprecated aria roles for bibliography entries.John MacFarlane
`doc-biblioentry` -> `listitem` `doc-bibliography` -> `list` Closes #8354.
2022-10-02Officially deprecate writeJATS...John MacFarlane
in favor of writeJatsArchiving.
2022-10-01JATS writer: use `<break/>` for LineBreak...John MacFarlane
in the limited contexts that accept it. Closes #8344.
2022-09-30[API Change] Extract Lua code into new package pandoc-lua-engineAlbert Krewinkel
The flag 'lua53` must now be used with that package if pandoc is to be compiled against Lua 5.3.
2022-09-30[API Change] App: parameterize `options` over the scripting engineAlbert Krewinkel
2022-09-30[API Change] Filter: Parameterize `applyFilters` over scripting engine.Albert Krewinkel
Pass the scripting engine as a parameter so it can be swapped out.
2022-09-30[API Change] Rename `pandocVersion` to `pandocVersionText`...Albert Krewinkel
and add a new `pandocVersion` value with type `Version`. This is consistent with the type used for `pandocTypesVersion` and allows to use the value where a Version type is required.
2022-09-29Add `--list-tables` option.John MacFarlane
[API change] Add writerListTables to WriterOptions. RST writer: Remove sensitivity to "list-table" class in table attributes. Instead, just check `writerListTables` in writer options. See #4564.
2022-09-29rST writer: list tables rendering, closes #4564danse
When a table is marked with a "list-table" attribute class, it will now be rendered using the list table syntax documented here http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table
2022-09-28HTML Reader: Tests for 'tt' and 'code' elements (#8330).Justin Wood
tt is a deprecated element in HTML, but is still used in the wild in some places, support reading it as just another 'code' element. Commit 4abb9d0ad8dbb88fbc443a78d5a1b116cb7a5816 was originally part of this PR as well.
2022-09-28HTML writer: prevent `<a>` inside `<a>`.John MacFarlane
If a link text contains a link, we replace it with a span. See #7585.
2022-09-27Tests.Command: remove unused `runTest`.John MacFarlane
2022-09-27Fix small whitespace things.John MacFarlane
2022-09-21LaTeX writer: do not repeat caption on headless tablesAlbert Krewinkel
The caption of headless tables was repeated on each page that contained part of the table. It is now made part of the "first head", i.e. the table head that is printed only once.
2022-09-20Ms writer: properly format display equations.John MacFarlane
Previously they were being translated to eqn as inline equations. Closes #8308.
2022-09-19Commonmark writer: ensure that we don't have blank lines in raw HTML.John MacFarlane
Closes #8307.
2022-09-19Org reader: Allow org-ref v2 citations with `&` prefix.John MacFarlane
Closes #8302.
2022-09-18BibTeX parser: fix handling of `%` in url field.John MacFarlane
`%` does not function as a comment character inside `url` (where URL-encoding is common). Commit 6fb2973a582116cd515c6f7e68794cca22955511 mistakenly took this reassignment of `%` to be a general feature of braced (but not quoted) BibTeX fields. This commit restores the correct behavior of `%` in braced fields other than `url`, and corrects the behavior of `%` in `url` when the value is quoted. Closes #7678 (again).
2022-09-18Add prefixes to identifiers with `--file-scope`. (#8282)John 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-14Fix implicit_header_references with duplicate headings.John MacFarlane
Documentation says that when more than one heading has the same text, an implicit reference `[Heading text][]` refers to the first one. Previously pandoc linked to the last one instead. This patch makes pandoc conform to the documented behavior. See #8300.
2022-09-09Citeproc: Require a digit for an implicit "page" locator...John MacFarlane
inside explicit locator syntax `{...}`. Previously a locator specified as `{}` would be rendered as `p.` with nothing after it. Closes #8288.
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