Skip to content

Lua: add function pandoc.utils.documentation#11383

Merged
jgm merged 1 commit intojgm:mainfrom
tarleb:lua-documentation
Jan 15, 2026
Merged

Lua: add function pandoc.utils.documentation#11383
jgm merged 1 commit intojgm:mainfrom
tarleb:lua-documentation

Conversation

@tarleb
Copy link
Collaborator

@tarleb tarleb commented Jan 7, 2026

The function allows to retrieve the documentation of an object. It can be used during interactive development and to generate API documentation.

@tarleb
Copy link
Collaborator Author

tarleb commented Jan 7, 2026

This works, but is incomplete, as only ANSI output is supported right now. I have to shelf this for a couple of days, and the PR is intended to allow some preliminary testing and gather feedback.

@tarleb
Copy link
Collaborator Author

tarleb commented Jan 7, 2026

I'll consider this PR ready if it allows to replace most of tools/update-lua-module-docs.lua with calls to pandoc.utils.documentation.

@tarleb tarleb force-pushed the lua-documentation branch 6 times, most recently from 1b54b43 to c3ca145 Compare January 13, 2026 10:01
@tarleb tarleb force-pushed the lua-documentation branch from c3ca145 to 924feb3 Compare January 15, 2026 07:30
@tarleb
Copy link
Collaborator Author

tarleb commented Jan 15, 2026

Most of tools/update-lua-module-docs.lua is still required, but just for the main pandoc module, and automatic docs generation is disabled for pandoc.zip and pandoc.layout, all of which are a bit special.
Documentation for all other modules is now generated through the new function.

Here's a screenshot of running pandoc.utils.documentation(pandoc.read):

Bildschirmfoto vom 2026-01-15 08-38-29

I consider this PR ready.

@tarleb tarleb force-pushed the lua-documentation branch from 924feb3 to 21a0a3c Compare January 15, 2026 08:15
@jgm jgm merged commit 9219a31 into jgm:main Jan 15, 2026
8 of 11 checks passed
@jgm
Copy link
Owner

jgm commented Jan 15, 2026

Great!

@tarleb tarleb deleted the lua-documentation branch January 15, 2026 12:43
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.

2 participants