July 5, 2026
Small caps, big feelings
Pandoc Lua Filters
Pandoc’s new built-in script trick wins speed fans but sparks “is this thing bloated?” panic
TLDR: Pandoc can now run built-in Lua scripts to modify documents faster and with fewer setup headaches. Commenters immediately turned it into a drama thread: some love the convenience, while others worry the tool is growing too complicated and losing its old simplicity.
Pandoc, the beloved document-converter for people who like turning one kind of file into another, just reminded everyone it has a built-in Lua scripting system that can tweak documents faster and without extra software installs. The sales pitch is simple: instead of passing huge chunks of text back and forth in a clunky way, Pandoc now does the job inside itself. Result? A small but very real speed boost. In the example shown, the Lua version beat both the Python and Haskell versions, which is exactly the kind of benchmark that gets nerds dramatically adjusting their glasses.
But the real fireworks came from the comments, where the mood instantly split into “nice, this is cleaner and faster” versus “uh oh, is Pandoc becoming a giant overstuffed toolbox?” One longtime user, lifthrasiir, basically hit the brakes and asked whether Pandoc is becoming increasingly bloated, saying the docs now feel nothing like the older, simpler days and wondering how much old Lua code still works. That’s the classic tech-community plot twist: a feature meant to make life easier also triggers nostalgia, compatibility anxiety, and the eternal fear that useful software is quietly turning into a monster.
Then came the wildcard energy. chaoxu wondered if Pandoc could become reactive—basically updating instantly as you edit—then casually tossed in that with all these AI tools, maybe now’s the time to try. So yes, one commenter is worried the app is getting fat, and another is ready to bolt a futuristic live-update brain onto it. Peak comment-section cinema.
Key Points
- •Traditional Pandoc filters operate on a JSON representation of the AST and can be written in any programming language using the `--filter` option.
- •The article says traditional filters have overhead from JSON input/output and may depend on external interpreters and libraries in the user environment.
- •Pandoc 2.0 introduced built-in Lua filters with an embedded Lua 5.4 interpreter and Lua library, removing external dependencies.
- •A sample Lua filter replaces `Strong` elements with `SmallCaps` elements and is run with `--lua-filter=...`.
- •In the article’s benchmark, the Lua filter ran faster than equivalent Haskell and Python JSON filters when converting the Pandoc manual to HTML.