aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-02-04Docx zotero/mendeley/endnote: add comma before locator in suffix.John MacFarlane
2022-02-04Add endnotexml reader test.John MacFarlane
2022-02-04Add mendeley citation tests.John MacFarlane
2022-02-03Docx reader: add bibliographic entries for zotero ADDIN.John MacFarlane
Bibliographic data embedded in citation items is added to the `references` metadata field. Closes #7840.
2022-02-03Add zoreto test with +citations.John MacFarlane
So far, though, we still don't include the references in the metadata.
2022-02-03Add zotero citation test with docx-citations.John MacFarlane
2022-01-31Custom writer: default to single quotes for stringsAlbert Krewinkel
Makes the code more consistent and makes it easier to use double quotes in strings, which is the usual quoting style used for HTML attributes. Closes: #7487
2022-01-29Use `[x]` not `[X]` for asciidoctor checklists.John MacFarlane
See #7798.
2022-01-28HTML writer: avoid duplicate "style" attributes on table cellsAlbert Krewinkel
Fixes: #7871
2022-01-28Don't read files outside of user data directoryEven Brenden
If a file path does not exist relative to the working directory, but it does exist relative to the user data directory, and it exists outside of the user data directory, do not read it. This applies to readDataFile and readMetadataFile in PandocMonad and, by extension, any module that uses these by passing them relative paths.
2022-01-23CommonMark reader: fix source position after YAML metadata.John MacFarlane
Closes #7863.
2022-01-21Fix compiler warnings.John MacFarlane
2022-01-21Update command tests to distinguish stderr and test exit status.John MacFarlane
2022-01-21Search for metadata files in $DATADIR/metadata (#7851)Even Brenden
If files specified with `--metadata-file` are not found in the working directory, look in `$DATADIR/metadata`. Expose new `readMetadataFile` function from Text.Pandoc.Class [API change]. Expose new `PandocCouldNotFindMetadataFileError` constructor for `PandocError` from Text.Pandoc.Error [API change]. Closes #5876.
2022-01-20Avoid putting a frame around speaker notes in beamer.John MacFarlane
If speaker notes (a Div with class 'notes') occur right after a section heading, but above slide level, the resulting `\note{..}` caommand should not be wrapped in a frame, as that will cause a spurious blank slide. Closes #7857.
2022-01-20HTML writer: don't break lines inside code elements.John MacFarlane
With the new (default) line wrapping of HTML, in conjunction with the default CSS which includes `code { whitespace: pre-wrap; }`, spurious line breaks could be introduced into inline code. Closes #7858.
2022-01-19Markdown writer: handle explicit column widths with pipe tables.John MacFarlane
If a table has explicit column width information *and* the content extends beyond the `--columns` width, we need to adjust the widths of the pipe separators to encode this width information. Closes #7847.
2022-01-19Remove unused file test/command/jats.cslAlbert Krewinkel
2022-01-18Docx writer: Separate tables even with RawBlocks between (#7844)Michael Hoffmann
Adjacent docx tables need to be separated by an empty paragraph. If there's a RawBlock between tables which renders to nothing, be sure to still insert the empty paragraph so that they will not collapse together. Fixes #7724
2022-01-16Support checklists in asciidoctor writer (#7832)Nikolai Korobeinikov
The checklist syntax (similar to `task_list` in markdown) seems to be an asciidoctor-only addition. Co-authored-by: ricnorr <[email protected]>
2022-01-16CSS in HTML template: adjust #TOC and h1 on mobile (#7835)Mauro Bieg
2022-01-15Improve on fix to #7506.John MacFarlane
Don't boldface code in output formats that can represent it as monospace. Define aliases for VI, VB, VBI as well.
2022-01-15Man writer: use custom font V for inline code.John MacFarlane
The V font is defined conditionally, so that it renders like CB in output formats that support that, and like B in those that don't (e.g. the terminal). We could just redefine C, but this would affect code blocks, too, and putting them all in boldface looks ugly, I think. Possible drawback: fragments created by pandoc's man writer will presuppose a nonstandard V font. Closes #7506. Supersedes 253467a549dcc22384be96041fd6f886c4a7a935.
2022-01-15Man writer: Use boldface for inline code.John MacFarlane
Closes #7506. This also allows us to get rid of some special casing on definition lists that ensured that options in code spans would be boldface. (If this change is ever reverted, we'll need that again.)
2022-01-13Add test for #7826 notes-after-punctuation.John MacFarlane
2022-01-11Docx writer: Handle bullets correctly in lists by not reusing numIds (#7822)Michael Hoffmann
Make sure that we only create one bullet per list item in docx. In particular, when a div is a list item, its contained paragraphs will now no longer wrongly get individual bullets. This is accomplished by making sure that for each list, we only use the associated numId once. Any repeated use would add incorrect bullets to the document. Closes #7689
2022-01-10HTML writer: don't break attributes values when wrapping.John MacFarlane
2022-01-10Fix regression: allow blank lines in HTML attributes.John MacFarlane
The commit 7a9832166e36f77402d5e0259647e9f5c7ba4e58 had the effect that blank lines would be collapsed in HTML attributes. We also roll back a change that collapsed multiple spaces into one.
2022-01-09Org reader: support alphabetical (fancy) listsLucas Viana
This adds support for alphabetical lists in org by enabling the extension Ext_fancy_lists, mimicking the behaviour of Org Mode when org-list-allow-alphabetical is enabled. Enabling Ext_fancy_lists will also make Pandoc differentiate between the delimiters of ordered lists (periods or closing parentheses). Org does this differentiation by default when exporting to some formats (e.g. plain text) but does not in others (e.g. html and latex), so I decided to copy Pandoc's markdown reader behaviour.
2022-01-08Org writer: fix list items starting with a code block...John MacFarlane
or other non-paragraph content. Closes #7810.
2022-01-08Avoid blank lines after tight sublists in org, haddock.John MacFarlane
T.P.Writers.Shared `endsWithPlain` now returns True if the list ends with a list which ends with a Plain. See #7810.
2022-01-08Org writer: don't add blank line before lists.John MacFarlane
The code to do this was apparently copied over from the RST writer, but these blank lines aren't necessary or desirable in org. See #7810 comment 3.
2022-01-07Fix parsing of footnotes in `--metadata-file`.John MacFarlane
Closes #7813.
2022-01-07Org writer: support starting number cookiesLucas Viana
This complements #7806 by supporting writing Org ordered lists that start at a specific number.
2022-01-06MediaWiki writer: Remove redundant display text for wiki linksJesse Hathaway
Prior to this commit the MediaWiki writer always added the display text for a wiki link: * [[Help|Help]] * [[Bubbles|Everyone loves bubbles]] However the display text in the first example is redundant since MediaWiki uses the target as the default display text. The result being: * [[Help]] * [[Bubbles|Everyone loves bubbles]]
2022-01-06Org reader: support counter cookies in listsLucas Viana
This adds support for counter cookies in org lists. Such cookies are used to override the item counter in ordered lists. In org it is possible to set the counter at any list item, but since Pandoc AST does not support this, we restrict the usage to setting an offset for the entire ordered list, by using the cookie in the first list item. Note that even though unordered lists do not have counters, Org Mode still parses such cookies in unordered lists and suppresses them in the output, so we do the same. Also, even though org-list-allow-alphabetical is disabled in Emacs by default, for some reason alphabetical cookies are always parsed and used in Org Mode regardlessly of whether this option is enabled or the list style is decimal, so we do the same. E.g. 2. test 3. test Is parsed as an ordered list starting at 1, as before. This also conforms to Org Mode behaviour. 1. [@2] test 2. test Is now parsed as an ordered list starting at 2, so that it conforms to Org Mode behaviour. Note that when parsing 1. [@2] test 2. [@9] test the second cookie is silenced and the entire list starts at 2. This is because the current Pandoc AST does not support expressing a change in the counter at a specific item.
2022-01-05AsciiDoc writer: improve detection of intraword emphasis.John MacFarlane
Closes #7803.
2022-01-04Lua: add `pandoc.template` moduleAlbert Krewinkel
The module provides a `compile` function to use strings as templates.
2022-01-04Lua: add `pandoc.WriterOptions` constructorAlbert Krewinkel
2022-01-03DocBook reader: be sensitive to spacing="compact" in lists.John MacFarlane
When spacing="compact" is set, Para elements are turned into Plain, so we get a "tight" list. Closes #7799.
2022-01-02ConTeXt template: make title appear in PDF title bar.John MacFarlane
This is recommended for accessibility reasons. Note: doesn't work with macOS Preview.app. See https://groups.google.com/d/msgid/pandoc-discuss/m2lezx20jq.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net
2022-01-02Odt: Add list-headerTuong Nguyen Manh
The list-header is a type of list-item. Therefore, it will be treated exactly like one.
2022-01-02Change reference.pptx to use 16:9 aspect ratio.John MacFarlane
This is now Powerpoint's default.
2022-01-02Copyright notices: update for 2022Albert Krewinkel
2022-01-01Org reader: allow trailing spaces after key/value pairs in directivesAlbert Krewinkel
Ensures that spaces at the end of attribute directives like `#+ATTR_HTML: :width 100%` (note the trailing spaces) are accepted.
2021-12-30Lua: allow binary (byte string) readers to be used with `pandoc.read`Albert Krewinkel
2021-12-28OpenDocument writer: fix vertical align bug with display math.John MacFarlane
Previously some displayed formulas would be floated above a preceding text line. This is fixed by setting vertical-rel to 'text' rather than 'paragraph-content'. Closes #7777.
2021-12-25Lua: improve handling of empty caption, body by `from_simple_table`Albert Krewinkel
Create truly empty table caption and body when these are empty in the simple table. Fixes: #7776
2021-12-22HTML writer: make line breaks more consistent.John MacFarlane
- With `--wrap=none`, we now output line breaks between block-level elements. Previously they were omitted entirely, so the whole document was on one line, unless there were literal line breaks in pre sections. This makes the HTML writer's behavior more consistent with that of other writers. - Put newline after `<dd>`. - Put newlines after block-level elements in footnote section.
2021-12-22Add text wrapping to HTML output.John MacFarlane
Previously the HTML writer was exceptional in not being sensitive to the `--wrap` option. With this change `--wrap` now works for HTML. The default (as with other formats) is automatic wrapping to 72 columns. A new internal module, T.P.Writers.Blaze, exports `layoutMarkup`. This converts a blaze Html structure into a doclayout Doc Text. In addition, we now add a line break between an `img` tag and the associated `figcaption`. Note: Output is never wrapped in `writeHtmlStringForEPUB`. This accords with previous behavior since previously the HTML writer was insensitive to `--wrap` settings. There's no real need to wrap HTML inside a zipped container. Note that the contents of script, textarea, and pre tags are always laid out with the `flush` combinator, so that unwanted spaces won't be introduced if these occur in an indented context in a template. Closes #7764.