Skip to content

Lua: add function pandoc.with_state#11371

Merged
jgm merged 1 commit intojgm:mainfrom
tarleb:lua-with_state
Jan 2, 2026
Merged

Lua: add function pandoc.with_state#11371
jgm merged 1 commit intojgm:mainfrom
tarleb:lua-with_state

Conversation

@tarleb
Copy link
Collaborator

@tarleb tarleb commented Jan 2, 2026

The function allows to run a callback with a modified pandoc state. This
provides the ability to temporarily modify the resource path, the user
data directory, and the HTTP request headers.

Closes: #10859

The function allows to run a callback with a modified pandoc state. This
provides the ability to temporarily modify the resource path, the user
data directory, and the HTTP request headers.

Closes: jgm#10859
@jgm jgm merged commit 8f8ea44 into jgm:main Jan 2, 2026
8 of 11 checks passed
@tarleb tarleb deleted the lua-with_state branch January 2, 2026 16:18
@kainctl
Copy link

kainctl commented Jan 3, 2026

Hey, this is great! Thanks!
One question though, why silently ignore errors?
I tried this feature and it didn't seem to work at first. Only later did I discover that I typed resource_paths instead of resource_path.

@tarleb
Copy link
Collaborator Author

tarleb commented Jan 3, 2026

Honest answer: because checking for invalid options is more work and didn't strike me as necessary at first. We can add it though, please raise an issue so we won't forget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability to modify the resource path from lua

3 participants