aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)Author
2021-05-28Support `rebase_relative_paths` for commonmark based formats.John MacFarlane
(Including `gfm`.)
2021-05-27Two citeproc locator/suffix improvements:John MacFarlane
- 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 MacFarlane
2021-05-27rebase_relative_paths extension: don't change fragment paths.John MacFarlane
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 MacFarlane
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 MacFarlane
Closes #7321.
2021-05-27Add `rebase_relative_paths` extension.John MacFarlane
- 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 MacFarlane
- 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 MacFarlane
And fix a test that failed in that way!
2021-05-25Fix a command test so it writes to stdout not stderr.John MacFarlane
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 MacFarlane
We weren't doing it consistently and it seems unnecessary.
2021-05-22Handle relative lengths (e.g. `2*`) in HTML column widths.John MacFarlane
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 MacFarlane
Closes #6541.
2021-05-20Ms writer: handle tables with multiple paragraphs.John MacFarlane
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 MacFarlane
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 MacFarlane
2021-05-20LaTeX reader sinuitx: fix + sign on ang.John MacFarlane
2021-05-20LaTeX reader siunitx: add leading 0 to numbers starting with .John MacFarlane
2021-05-20LaTeX reader: Fix parsing of `+-` in siunitx numbers.John MacFarlane
See #6658.
2021-05-20LaTeX reader: support `\pm` in `SI{..}`.John MacFarlane
Closes #6620.
2021-05-19LaTeX reader: better support for `\xspace`.John MacFarlane
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 Krewinkel
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 MacFarlane
See #6259.
2021-05-14Beamer writer: support exampleblock and alertblock.John MacFarlane
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 Krewinkel
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 MacFarlane
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 MacFarlane
Closes #7266.
2021-05-11LaTeX writer: better handling of line breaks in simple tables.John MacFarlane
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 Krewinkel
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 MacFarlane
Improves heuristic for detection of an "open double quote." Closes #2103.
2021-04-28Smarter smart quotes.John MacFarlane
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 Tojnar
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 MacFarlane
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 MacFarlane
It is basically the same as biblaetx-quotes.md.
2021-04-18Use MetaInlines not MetaBlocks for multimarkdown metadata fields.John MacFarlane
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 MacFarlane
Update citeproc test.
2021-04-17Use BCP47 language codes in citeproc tests.John MacFarlane
2021-04-17Use new citeproc + unicode-collation.John MacFarlane
Add command test for unicode-collation.
2021-04-16JATS writer: reduce unnecessary use of <p> elements for wrappingAlbert Krewinkel
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 MacFarlane
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 MacFarlane
instead of entities. Closes #7208.
2021-03-24Fix DocBook reader mathml regression...John MacFarlane
...caused by the switch in XML libraries. Also fixed a similar issue in JATS. Closes #7173.
2021-03-17Add test for #7155.John MacFarlane
2021-03-13MediaWiki reader: Allow block-level content in notes (ref).John MacFarlane
Closes #7145.
2021-03-10HTML writer: Add warnings on duplicate attribute values.John MacFarlane
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 MacFarlane
Previously comments sometimes got extended too far. Closes #7134.
2021-03-09Org writer: prevent unintended creation of ordered list itemsAlbert Krewinkel
Adjust line wrapping if default wrapping would cause a line to be read as an ordered list item. Fixes #7132
2021-03-07LaTeX reader: handle table cells containing `&` in `\verb`.John MacFarlane
Closes #7129.
2021-02-26Update tests for changes to https URLs.John MacFarlane
2021-02-22T.P.CSV: fix parsing of unquoted values.John MacFarlane
Previously we didn't allow unescaped quotes in unquoted values, but they are allowed. Closes #7112.