aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-10-12Markdown writer: Fix autolinks rendering for gfm.John MacFarlane1-0/+7
Previously, autolinks rendered as raw HTML, due to the `class="uri"` added by pandoc's markdown reader. Closes #6740.
2020-10-10LaTeX reader: allow blank lines inside `\author`.John MacFarlane1-0/+17
2020-10-10Update s5-fancy.html test with new mathjax URL.John MacFarlane1-1/+1
2020-10-08LaTeX reader: Fix parsing of "show name" in newtheorem.John MacFarlane1-1/+1
Previously we were just treating it as a string and ignoring accents and formatting. See #6734.
2020-10-08Extend fix to #6719 to JATS readerJohn MacFarlane1-0/+10
2020-10-08DocBook reader: don't squelch space at end of emphasis element.John MacFarlane1-0/+8
Instead, include it after the emphasis. Closes #6719. Same fix was made for other inline elements, e.g. strikethrough.
2020-10-08Fixed some bibtex comments in tests (closing }).John MacFarlane2-2/+4
2020-10-08Fix custom writer test.John MacFarlane1-2/+2
The custom writer is now less aggressive about escaping `"`.
2020-10-08Be less aggressive about using quotes for YAML values.John MacFarlane121-618/+616
We need quotes if `[` or `{` or `'` is at the beginning of the line, but not otherwise.
2020-10-07Use double quotes for YAML metadata.John MacFarlane127-881/+881
Closes #6727.
2020-10-07Use golden test framework for command tests.John MacFarlane1-27/+59
This means that `--accept` can be used to update expected output.
2020-10-07Fix URL prefixes in citations also when they occur in notes.John MacFarlane8-128/+407
Update chicago-fullnote-bibliography.csl and adjust tests. Closes #6723.
2020-10-06Unescape entities in writing CSL JSON.John MacFarlane1-0/+17
The renderCslJson function escapes `<`, `>`, and `&` as entities. This is appropriate when generating HTML, but in CSL JSON these are supposed to appear unescaped. Closes jgm/citeproc#17.
2020-10-06DOCX reader: Allow empty dates in comments and tracked changes (#6726)Diego Balseiro5-0/+18
For security reasons, some legal firms delete the date from comments and tracked changes. * Make date optional (Maybe) in tracked changes and comments datatypes * Add tests
2020-10-03Use latest citeproc.John MacFarlane1-5/+7
Update chicago-fullnute-bibliography test, which is now correct.
2020-10-02Docx writer: better handle list items whose contents are lists (#6522)Michael Hoffmann3-0/+13
If the first element of a bulleted or ordered list is another list, then that first item will disappear if the target format is docx. This changes the docx writer so that it prepends an empty string for those cases. With this, no items will disappear. Closes #5948.
2020-10-01Update to lastest citeprocJohn MacFarlane2-4/+3
2020-09-27OpenDocument Writer: Implement table cell alignment (#6700)Nils Carlson2-20/+65
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
2020-09-26Fix short-title.John MacFarlane1-14/+18
We were getting null short-titles generated, and that was creating wrong citations in some cases. Close #6702.
2020-09-25RST reader: apply `.. class::` directly to following Header.John MacFarlane1-0/+13
rather than creating a surrounding Div. Closes #6699.
2020-09-24DocBook reader: Implement table cell alignment (#6698)Nils Carlson2-40/+77
2020-09-24Citeproc: Insert space after csl-left-margin span contents...John MacFarlane3-5/+5
if they come before csl-right-inline. This ensures that the citation number or label will be separated from the rest by a space, even in formats (like plain) that don't yet have special handling for the display spans.
2020-09-24OpenDocument writer: New table cell support with row and column spans (#6682)Nils Carlson1-0/+157
Unit tests only verify column spans at this point. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-21Add built-in citation support using new citeproc library.John MacFarlane223-10/+24913
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
2020-09-21Markdown reader: Set citationNoteNum accurately in citations.John MacFarlane5-21/+21
This also changes stateLastNoteNumber -> stateNoteNumber.
2020-09-20Lua filters: add SimpleTable for backwards compatibility (#6575)Albert Krewinkel1-0/+66
A new type `SimpleTable` is made available to Lua filters. It is similar to the `Table` type in pandoc versions before 2.10; conversion functions from and to the new Table type are provided. Old filters using tables now require minimal changes and can use, e.g., if PANDOC_VERSION > {2,10,1} then pandoc.Table = pandoc.SimpleTable end and function Table (tbl) tbl = pandoc.utils.to_simple_table(tbl) … return pandoc.utils.from_simple_table(tbl) end to work with the current pandoc version.
2020-09-19Asciidoctor images (#6671)argent02-2/+2
Support `Asciidoctor`'s block figures. Closes #6538.
2020-09-19Add CSS to default HTML template (#6601)Mauro Bieg4-0/+424
2020-09-15LaTeX writer: fix spacing issue with list in definition list.John MacFarlane1-0/+67
When a list occurs at the beginning of a definition list definition, it can start on the same line as the label, which looks bad. Fix that by starting such lists with an `\item[]`.
2020-09-15LaTeX reader: fix improper empty cell filtering (#6689)Christian Despres1-6/+26
2020-09-13HTML writer: support intermediate table headersAlbert Krewinkel4-1/+148
Closes: #6314
2020-09-13HTML writer: support attributes on all table elementsAlbert Krewinkel3-33/+33
Add attributes to tbody and tr elements.
2020-09-13Fix hlint suggestions, update hlint.yaml (#6680)Christian Despres10-29/+27
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
2020-09-12HTML writer: render table footers if presentAlbert Krewinkel4-6/+171
Part of: #6314
2020-09-12[API change] Rename Writers.Tables and its contents (#6679)Christian Despres2-66/+68
Writers.Tables is now Writers.AnnotatedTable. All of the types and functions in it have had the "Ann" removed from them. Now it is expected that the module be imported qualified.
2020-09-10Changed default link state to invisible (#6676)Leonard Rosenthol4-32/+166
2020-09-10Improved uncertainty handling in slunitx.John MacFarlane1-0/+3
2020-09-10LaTeX reader: support parenthesized uncertainties in siunitx.John MacFarlane1-0/+12
2020-09-10Support colspans and rowspans in HTML tables (#6644)Albert Krewinkel4-2/+423
* HTML writer: add support for row headers, colspans, rowspans * Add planet table tests See #6312
2020-09-10Implement support for internal document links in ICML (#6606)Leonard Rosenthol4-0/+392
Closes #5541.
2020-09-10docbook reader: Implement column span support for tables (#6492)Nils Carlson1-0/+119
Implement column span support for tables in the DocBook reader. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-05Add Writers.Tables helper functions and types, add tests for those (#6655)Christian Despres2-0/+254
Add Writers.Tables helper functions and types, add tests for those The Writers.Tables module contains an AnnTable type that is a pandoc Table with added inferred information that should be enough for writers (in particular the HTML writer) to operate on without having to lay out the table themselves. The toAnnTable and fromAnnTable functions in that module convert between AnnTable and Table. In addition to producing an AnnTable with coherent and well-formed annotations, the toAnnTable function also normalizes its input Table like the table builder does. Various tests ensure that toAnnTable normalizes tables exactly like the table builder, and that its annotations are coherent.
2020-09-02LaTeX reader: Support squared, cubed, tothe in siunitx.John MacFarlane1-10/+41
Closes #6657.
2020-08-31Fix tests for skylighting 0.10Albert Krewinkel4-14/+14
2020-08-24Docx writer: separate adjacent tables.John MacFarlane1-0/+0
Word combines adjacent tables, so to prevent this we insert an empty paragraph between two adjacent tables. Closes #4315.
2020-08-15[Latex Reader] Fixing issues with \multirow and \multicolumn table cells (#6608)Laurent P. René de Cotret1-4/+13
* Added test to replicate (#6596) * Table cell reader not consuming spaces correctly (#6596) * Prevented wrong nesting of \multicolumn and \multirow table cells (#6603) * Parse empty table cells (#6603) * Support full prototype for multirow macro (#6603) Closes #6603
2020-08-14Change SIRange to SIrange (#6617)Emerson Harkin1-9/+9
2020-08-07[Latex Reader] Table cell parser not consuming spaces correctly (#6597)Laurent P. René de Cotret1-0/+7
* Added test to replicate (#6596) * Table cell reader not consuming spaces correctly (#6596)
2020-07-31Org writer: don't force blank line after headersAlbert Krewinkel1-27/+0
Closes: #6554
2020-07-23Minimal support for SIRange in LaTeX reader (#6418)Emerson Harkin1-0/+59
Add support for `\SIRange{firstnumber}{secondnumber}{unit}` provided by siunitx. An en-dash is used instead of localized "to".