Commit Graph
5 Commits
Author SHA1 Message Date
John MacFarlane 19c1f6552b pandoc-cli: rearrange build.
Hackage rejected the previous version, though it worked fine.
The problem was that with two pandoc.hs files in different
directories, one of them wasn't being included in the sdist tarball.

To work around this, put the WASM exported functions in a
library module that is conditionally imported.
2026-02-04 00:44:15 +01:00
John MacFarlane 38a10b6242 wasm query: implement more queries.
highlight-languages, highlight-styles, default-template.
2026-02-02 16:24:26 +01:00
John MacFarlane 26d1e601b3 wasm: Get reader/writer names dynamically.
Support "input-formats" and "output-formats" in wasm query.
2026-02-02 12:56:02 +01:00
John MacFarlane 8c6e906f83 wasm: expose "version" in query and put it in page footer on demo. 2026-02-02 12:13:07 +01:00
John MacFarlane f91faefbeb wasm: change interface.
We now provide two functions: convert and query.
extensions_for_format has been dropped, as query can do the
work.

convert is what pandoc used to be.

query takes a JSON object describing the information needed,
and returns information. Currently only "extensions-for-format"
is implemented.

Also: the use of multiple main-is causes problems with cabal.
Instead, we use pandoc.hs as main throughout, but change the
hs-src-dir for wasm.
2026-02-02 11:58:18 +01:00