jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.95k stars 3.35k forks source link

Document `pandoc.Blocks` and `pandoc.Inlines` #9584

Open CodeSandwich opened 6 months ago

CodeSandwich commented 6 months ago

Explain the problem.

There doesn't seem to be any documentation in https://pandoc.org/lua-filters.html#module-pandoc for pandoc.Blocks or pandoc.Inlines factory functions. It's especially confusing because Blocks and Inlines are described with:

It is usually not necessary to create values of this type in user scripts, as pandoc can convert other types into Blocks wherever a value of this type is expected

This suggests that there may be no way to directly create them manually e.g. if one needs to use walk on a list of blocks or inlines.

Pandoc version? Any

jgm commented 6 months ago

@tarleb can probably clarify this!

tarleb commented 6 months ago

I think that's an oversight on my part and thus indeed a documentation bug. Roping in @IlonaSilverwood.