aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2021-05-29Fix test #3752 (1) for Windows.John MacFarlane1-1/+1
2021-05-29Replace biblatex-exmaples.bib with shorter averroes.bib in tests.John MacFarlane3-1675/+96
2021-05-29Further test image size reductions.John MacFarlane2-0/+0
2021-05-28Support `rebase_relative_paths` for commonmark based formats.John MacFarlane1-0/+16
(Including `gfm`.)
2021-05-27Two citeproc locator/suffix improvements:John MacFarlane2-0/+54
- Recognize locators spelled with a capital letter. Closes #7323. - Add a comma and a space in front of the suffix if it doesn't start with space or punctuation. Closes #7324.
2021-05-27rebase_relative_paths: leave empty paths unchanged.John MacFarlane2-0/+5
2021-05-27rebase_relative_paths extension: don't change fragment paths.John MacFarlane2-0/+5
We don't want a pure fragment path to be rewritten, since these are used for cross-referencing.
2021-05-27Modify rebase_reference_links treatment of reference links/images.John MacFarlane3-1/+8
The directory is based on the file containing the link reference, not the file containing the link, if these differ.
2021-05-27Citeproc: Don't detect math elements as locators.John MacFarlane1-0/+24
Closes #7321.
2021-05-27Add `rebase_relative_paths` extension.John MacFarlane5-0/+49
- Add manual entry for (non-default) extension `rebase_relative_paths`. - Add constructor `Ext_rebase_relative_paths` to `Extensions` in Text.Pandoc.Extensions [API change]. When enabled, this extension rewrites relative image and link paths by prepending the (relative) directory of the containing file. - Make Markdown reader sensitive to the new extension. - Add tests for #3752. Closes #3752. NB. currently the extension applies to markdown and associated readers but not commonmark/gfm.
2021-05-27LaTeX reader: improve `\def` and implement `\newif`.John MacFarlane1-0/+55
- Improve parsing of `\def` macros. We previously set "verbatim mode" even for parsing the initial `\def`; this caused problems for things like ``` \def\foo{\def\bar{BAR}} \foo \bar ``` - Implement `\newif`. - Add tests.
2021-05-26Command tests: fail if a file contains no tests.John MacFarlane1-3/+5
And fix a test that failed in that way!
2021-05-25Fix a command test so it writes to stdout not stderr.John MacFarlane1-1/+1
The error message to stderr was appearing in test output and confusing some users, who thought it indicated a failing test rather than expected output.
2021-05-25Logging: remove single quotes around paths in messages.John MacFarlane2-2/+2
We weren't doing it consistently and it seems unnecessary.
2021-05-22Handle relative lengths (e.g. `2*`) in HTML column widths.John MacFarlane1-0/+29
See <https://www.w3.org/TR/html4/types.html#h-6.6>. "A relative length has the form "i*", where "i" is an integer. When allotting space among elements competing for that space, user agents allot pixel and percentage lengths first, then divide up remaining available space among relative lengths. Each relative length receives a portion of the available space that is proportional to the integer preceding the "*". The value "*" is equivalent to "1*". Thus, if 60 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are 1*, 2*, and 3*, the 1* will be alloted 10 pixels, the 2* will be alloted 20 pixels, and the 3* will be alloted 30 pixels." Closes #4063.
2021-05-20DocBook reader: ensure that first and last names are separated.John MacFarlane1-0/+27
Closes #6541.
2021-05-20Ms writer: handle tables with multiple paragraphs.John MacFarlane1-0/+40
Previously they overflowed the table cell width. We now set line lengths per-cell and restore them after the table has been written. Closes #7288.
2021-05-20LaTeX reader: More siunitx improvements. Closes #6658.John MacFarlane1-6/+66
There's still one slight divergence from the siunitx behavior: we get 'kg m/A/s' instead of 'kg m/(A s)'. At the moment I'm not going to worry about that.
2021-05-20LaTeX/siunitx: fix parsing of `\cubic` etc. See #6658.John MacFarlane1-0/+3
2021-05-20LaTeX reader sinuitx: fix + sign on ang.John MacFarlane1-0/+3
2021-05-20LaTeX reader siunitx: add leading 0 to numbers starting with .John MacFarlane2-3/+9
2021-05-20LaTeX reader: Fix parsing of `+-` in siunitx numbers.John MacFarlane1-1/+4
See #6658.
2021-05-20LaTeX reader: support `\pm` in `SI{..}`.John MacFarlane1-0/+3
Closes #6620.
2021-05-19LaTeX reader: better support for `\xspace`.John MacFarlane2-1/+24
Previously we only supported it in inline contexts; now we support it in all contexts, including math. Partially addresses #7299.
2021-05-18LaTeX writer: separate successive quote chars with thin spaceAlbert Krewinkel1-0/+10
Successive quote characters are separated with a thin space to improve readability and to prevent unwanted ligatures. Detection of these quotes sometimes had failed if the second quote was nested in a span element. Closes: #6958
2021-05-16Markdown writer: fewer unneeded escapes for `#`.John MacFarlane4-4/+4
See #6259.
2021-05-14Beamer writer: support exampleblock and alertblock.John MacFarlane1-0/+38
A block will be rendered as an exampleblock if the heading has class `example` and alertblock if it has class `alert`. Closes #7278.
2021-05-14HTML reader: don't fail on unmatched closing "script" tag.Albert Krewinkel1-0/+7
Prevent the reader from crashing if the HTML input contains an unmatched closing `</script>` tag. Fixes: #7282
2021-05-13Implement curly-brace syntax for Markdown citation keys.John MacFarlane1-0/+19
The change provides a way to use citation keys that contain special characters not usable with the standard citation key syntax. Example: `@{foo_bar{x}'}` for the key `foo_bar{x}`. Closes #6026. The change requires adding a new parameter to the `citeKey` parser from Text.Pandoc.Parsing [API change]. Markdown reader: recognize @{..} syntax for citatinos. Markdown writer: use @{..} syntax for citations when needed. Update manual with curly-brace syntax for citations. Closes #6026.
2021-05-12Hande 'annote' field in bibtex/biblatex writer.John MacFarlane1-0/+10
Closes #7266.
2021-05-11LaTeX writer: better handling of line breaks in simple tables.John MacFarlane1-0/+24
Now we also handle the case where they're embedded in other elements, e.g. spans. Closes #7272.
2021-05-05App: allow tabs expansion even if file-scope is usedAlbert Krewinkel1-0/+11
Tabs in plain-text inputs are now handled correctly, even if the `--file-scope` flag is used. Closes: #6709
2021-04-29Further improvements in smart quotes.John MacFarlane1-0/+8
Improves heuristic for detection of an "open double quote." Closes #2103.
2021-04-28Smarter smart quotes.John MacFarlane2-6/+25
Treat a leading " with no closing " as a left curly quote. This supports the practice, in fiction, of continuing paragraphs quoting the same speaker without an end quote. It also helps with quotes that break over lines in line blocks. Closes #7216.
2021-04-25Markdown writer: Cleaner (code)blocks with single class (#7242)Jan Tojnar4-6/+6
When a block only has a single class and no other attributes, it is not necessary to wrap the class attribute in curly braces – the class name can be placed after the opening mark as is. This will result in bit cleaner output when pandoc is used as a markdown pretty-printer.
2021-04-25Add quotes properly in markdown YAML metadata fields.John MacFarlane8-11/+11
This fixes a bug, which caused the writer to look at the LAST rather than the FIRST character in determining whether quotes were needed. So we got spurious quotes in some cases and didn't get necessary quotes in others. Closes #7245. Updated a number of test cases accordingly.
2021-04-25Remove biblatex-nussbaum.md test.John MacFarlane1-63/+0
It is basically the same as biblaetx-quotes.md.
2021-04-18Use MetaInlines not MetaBlocks for multimarkdown metadata fields.John MacFarlane1-0/+20
This gives better results in converting to e.g. pandoc markdown. Ref: <https://groups.google.com/d/msgid/pandoc-discuss/9728d1f4-040e-4392-aa04-148f648a8dfdn%40googlegroups.com>
2021-04-17Update to released unicode-collation, latest citeproc dev version.John MacFarlane1-4/+4
Update citeproc test.
2021-04-17Use BCP47 language codes in citeproc tests.John MacFarlane3-4/+4
2021-04-17Use new citeproc + unicode-collation.John MacFarlane1-0/+130
Add command test for unicode-collation.
2021-04-16JATS writer: reduce unnecessary use of <p> elements for wrappingAlbert Krewinkel1-0/+23
The `<p>` element is used for wrapping in cases were the contents would otherwise not be allowed in a certain context. Unnecessary wrapping is avoided, especially around quotes (`<disp-quote>` elements). Closes: #7227
2021-04-08Fix regression in grid tables for wide characters.John MacFarlane1-0/+28
In the translation from String to Text, a char-width-sensitive splitAt' was dropped. This commit reinstates it. Closes #7214.
2021-04-05Commonmark writer: Use backslash escapes for `<` and `|`...John MacFarlane1-0/+6
instead of entities. Closes #7208.
2021-03-24Fix DocBook reader mathml regression...John MacFarlane1-0/+137
...caused by the switch in XML libraries. Also fixed a similar issue in JATS. Closes #7173.
2021-03-17Add test for #7155.John MacFarlane1-0/+15
2021-03-13MediaWiki reader: Allow block-level content in notes (ref).John MacFarlane1-0/+12
Closes #7145.
2021-03-10HTML writer: Add warnings on duplicate attribute values.John MacFarlane1-0/+7
This prevents emitting invalid HTML. Ultimately it would be good to prevent this in the types themselves, but this is better for now. T.P.Logging: Add DuplicateAttribute constructor to LogMessage. [API change]
2021-03-09RST reader: fix logic for ending comments.John MacFarlane1-0/+16
Previously comments sometimes got extended too far. Closes #7134.
2021-03-09Org writer: prevent unintended creation of ordered list itemsAlbert Krewinkel1-0/+10
Adjust line wrapping if default wrapping would cause a line to be read as an ordered list item. Fixes #7132