Commit Graph
19123 Commits
Author SHA1 Message Date
John MacFarlane 5b83942a45 Bump to 3.10.1, update changelog.
Both pandoc and pandoc-cli.
2026-07-21 22:31:21 +02:00
John MacFarlane 4d3aca1a1c Add packages missing in nixpkgs to stack.yaml. 2026-07-21 21:32:29 +02:00
John MacFarlane a58bec7e48 Update flake.lock 2026-07-21 19:19:36 +02:00
John MacFarlane f7899139d5 Fixupper bound for typst. 2026-07-21 18:51:49 +02:00
John MacFarlane 4dc8e23133 stack.yaml - bump to lts-24.51 2026-07-21 18:46:21 +02:00
John MacFarlane 91f6353853 Use released texmath 0.13.2. 2026-07-21 18:37:01 +02:00
John MacFarlane 324710ee23 Require typst 0.11. 2026-07-21 18:10:39 +02:00
John MacFarlane ac2884c9f5 Use typst-symbols 0.3. 2026-07-21 17:25:11 +02:00
John MacFarlane ee2d48d089 Require doclayout 0.5.0.3 2026-07-21 17:21:32 +02:00
John MacFarlane 139badba76 Use released djot 0.1.4.1. 2026-07-21 17:19:44 +02:00
John MacFarlane dd0cd4096c Update flake.lock 2026-07-21 17:05:16 +02:00
John MacFarlane 42ab4f1c99 Makefile: Fix flake.lock rule. 2026-07-21 13:39:23 +02:00
John MacFarlane 27199723a1 Use released commonmark-extensions 0.2.7.1 2026-07-21 10:16:58 +02:00
John MacFarlane 89c887682f Trigger nix workflow when flake.lock changes 2026-07-21 09:32:36 +02:00
John MacFarlane 6df62cb613 Add Makefile rule to update all-cabal-hashes in flake.lock. 2026-07-21 09:23:31 +02:00
John MacFarlane f25f7d90cc Use skylighting-format-blaze-html 0.1.2.1. 2026-07-21 00:20:16 +02:00
John MacFarlane 90adedb7c1 nix.yml - trigger only on certain file changes. 2026-07-20 13:15:48 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4da39af987 Bump nix-community/cache-nix-action from 6 to 7 (#11765)
Bumps [nix-community/cache-nix-action](https://github.com/nix-community/cache-nix-action) from 6 to 7.
- [Release notes](https://github.com/nix-community/cache-nix-action/releases)
- [Changelog](https://github.com/nix-community/cache-nix-action/blob/main/RELEASES.md)
- [Commits](https://github.com/nix-community/cache-nix-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: nix-community/cache-nix-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 11:03:10 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 937412264a Bump cachix/install-nix-action from 30 to 31 (#11766)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 30 to 31.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](https://github.com/cachix/install-nix-action/compare/v30...v31)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: '31'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 11:02:56 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4e92bd54bc Bump actions/setup-dotnet from 5 to 6 (#11767)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 5 to 6.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 11:02:37 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 8c5b20341b Bump actions/checkout from 4 to 7 (#11768)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-20 11:02:15 +02:00
John MacFarlane d321adbabf CI: Add nix.yml workflow.
This is entirely due to @srid.
See #11707.
2026-07-18 15:59:45 +02:00
John MacFarlane eade305c71 Revamp flake.nix to use haskell.nix.
This allows the project to be built using `nix build` and run
using `nix run`.

The basis for this is @srid's work in #11707, with some
simplifications and improvements added on.

stack.yaml is used as a source of truth for the versions to use,
including for git repositories.

Closes #11707.
2026-07-18 15:55:56 +02:00
John MacFarlane d4e350c25a extras: add link to @tarleb's logo. 2026-07-18 10:16:51 +02:00
John MacFarlane db8d64fe6f Markdown writer: Fix ordered list bug.
Previously ordered lists starting with a code block did not
round trip. Pandoc uses an indented code block, and according
to commonmark rules only one space is gobbled after the list
marker; however, pandoc added two.  This has now been fixed.
An incidental change fixes an oddity in markua list indentation.

Closes #11762.
2026-07-14 17:34:15 +02:00
John MacFarlane bc64721fe5 MANUAL: small clarification in image section.
Explain what "link text" means here. See #11760.
2026-07-14 09:37:04 +02:00
Tobias Deiminger 5dd191098d RST reader: Fix nested placeholder resolution for inline elements (#11753)
Given RST like

    .. _target:

    See |sub|.

    .. |sub| replace:: `text <target_>`_

'pandoc -f rst -t html' produces

    <div id="target">
    <p>See <a href="##REF##target">text</a>.</p>
    </div>

instead of the expected

    <div id="target">
    <p>See <a href="#target">text</a>.</p>
    </div>

It formerly worked and regressed with c8fda8f4d ("RST reader: Use a new
one-pass parsing strategy."), release 3.6.

What happens is that during parsing pass 1 the `replace::` value `text
<target_>`_ is parsed to

    Link nullAttr [Str "text"] ("##REF##target", "")

and is stored in ParserState's substitution table. Separately, '|sub|'
usage is parsed to

    Link nullAttr [Str "|sub|"] ("##SUBST##|sub|", "")

and is stored in the document tree. resolveReferences then replaces the
placeholder in the document node with substitution table node during
walkM. However, the freshly substituted ##REF## placeholder was not
revisited further, and appeared unresolved in the output.

To fix it, we resolve the node recursively until the result contains no
more placeholder. We must protect from self-references to avoid
endless recursion.
2026-07-12 16:35:37 +02:00
ce37e24c6a PPTX writer: keep tables and surrounding text on same slide (#11411)
Previously, when a slide contained bullet points before and after a
table, content would be split across multiple slides or use a two-column
layout that didn't preserve the source order.

This change:

1. Modified `splitBlocks'` in Presentation.hs to continue accumulating
   content after tables instead of immediately splitting to a new slide.

2. When a slide has a table with surrounding text, use ContentSlide
   (single column) instead of ContentWithCaptionSlide (two columns)
   to preserve content order.

3. Added vertical stacking in Output.hs (shapesToElementsStacked) to
   properly position multiple shapes (tables + text) within a content
   area. Space is allocated proportionally based on content size
   (paragraphs and table rows).

Closes #11433.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Chris Callison-Burch <ccb+github@upenn.edu>
2026-07-12 12:51:11 +02:00
luginfandluginf c645e57dc8 Add Txt2Tags writer (#11699).
`t2t` is now supported as an output format, producing Txt2Tags
markup (<https://txt2tags.org>). The writer covers headers, lists
(bullet, ordered, definition), tables, links, images, code blocks,
inline formatting, and raw txt2tags/HTML passthrough.

[API change]
Adds a new module Text.Pandoc.Writers.Txt2Tags, exporting
`writeTxt2Tags`. Also exported from Text.Pandoc.Writers.

Co-authored-by: luginf <alan@luginf>
2026-07-12 12:50:54 +02:00
John MacFarlane 36f183cda2 MANUAL.txt: Rewrite "A note on security."
Clarify the risks of using pandoc in a web service and explain
how to do so more safely. Note some specific vulnerabilities
with the pdf-engine `wkhtmltopdf`.

This incorporates the suggestions made in #11262 and also
benefits from a report by Kai Aizen.
2026-07-12 12:22:17 +02:00
John MacFarlane dd252754d4 stack.yaml: add three deps that are not strictly needed...
...but will make the new nix flake easier. See #11707.
2026-07-12 12:17:15 +02:00
John MacFarlane 8831b48b9d Change symlink to regular file for COPYING.md in...
pandoc-cli, pandoc-lua-engine, pandoc-server.
2026-07-12 12:09:50 +02:00
John MacFarlane 25bd786f58 Clean up whitespace in COPYING.md 2026-07-12 12:09:45 +02:00
John MacFarlane 9d138e2d33 Shared: taskListItemFromAscii - handle empty task list case. 2026-07-12 12:03:59 +02:00
Chirag Dhamange 432414c236 Fix: GFM empty task list conversion to ballot (#11744)
Extend `taskListItemToAscii` to cover empty task lists.
Closes #11599.
2026-07-12 12:01:23 +02:00
John MacFarlane bb00041908 Clarify native_numbering extension. Closes #11599. 2026-07-12 11:44:47 +02:00
John MacFarlane 780e605c95 Texinfo writer: fix escaping in links.
Previously we dropped periods, commas, etc. This was a regression
from 2024. All we really need to do is escape the comma.

Closes #11758.
2026-07-11 10:57:33 +02:00
John MacFarlane ce1327e0b8 Use dev version of djoths.
Update test for djot parser fix.
2026-07-10 22:42:10 +02:00
John MacFarlane e5fab443f6 MANUAL.txt: include Lua filter to set float attribute on tables. 2026-07-10 16:44:29 +02:00
John MacFarlane 3ecd95bf00 LaTeX writer: Provide a way to use table instead of longtable.
When the `float` class is attached to a table, a standard
floating `table` will be generated instead of a `longtable`.
Placement can be specified via the `latex-placement` attribute.
This will help, especially, those who use two-column layouts,
since `longtable` is incompatible with these.

Small change to the default LaTeX template: the `caption`
package is included and a default spacing set between the caption
and the table.

Closes #1023.
2026-07-10 16:38:03 +02:00
John MacFarlane d982f9f5ec Typst template: polyfill divider for typst < 0.15. 2026-07-09 01:28:43 +02:00
John MacFarlane d2f33e5b53 Typst reader/writer: use divider() for horizontal rule.
Remove old `horizontalRule` definition from default template.

Modify tests to use non-deprecated symbols.

Closes #11540.
2026-07-09 01:12:18 +02:00
John MacFarlane 6bdf248a6e Use dev skylighting-format-blaze-html. 2026-07-08 23:43:44 +02:00
John MacFarlane 5ec0ab60c8 Depend on dev typst-hs. 2026-07-08 12:03:46 +02:00
John MacFarlane 1d6f33b897 Typst: further tight term list improvements.
Modified default template to remove custom show rule for
terms. Instead, we use a set rule to set hanging-indent.

For tight list items consisting of just one Plain block,
we no longer create a `#block` for the definition; this allows
it to remain on the same line as the term.
2026-07-08 11:18:31 +02:00
Amir Dekel 59c5eab2a0 Add support for tight terms in Typst writer (#11748)
This just affects whether a blank line is emitted in the markup.
Note that pandoc's default template contains a show rule for
terms that will make these blank lines irrelevant, but this change
allows one to use tight lists with custom templates.
2026-07-08 10:42:56 +02:00
John MacFarlane 7b1021eb3e Use dev commonmark-extensions. 2026-07-08 01:04:01 +02:00
John MacFarlaneandClaude 9ebf79dd4b RTF writer: allow fontsize to be specified.
The fontsize is specified in a variable or metadata field
and passed through the renderer via a Reader monad.

Closes #11750.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-08 00:41:30 +02:00
John MacFarlane f6edf03303 Shared: Improve makeSections.
Previously it would sometimes create doubled section divs.
By leaving the inner heading's id on the heading itself, and
then consolidating the inner and outer section divs, we can
avoid this undesirable result.

Closes #11745.
2026-07-07 20:58:33 +02:00
John MacFarlane db7efddf74 Texinfo writer: fix spacing bug around HorizontalRule.
Closes #11749.
2026-07-07 16:58:44 +02:00