Commit Graph
19 Commits
Author SHA1 Message Date
gemmaro 225b09dbc7 docs: Correct Asciidoctor name casing. (#11782) 2026-07-29 09:54:16 +02:00
John MacFarlane 5ee0c74f5c wasm/index.js: include filter to embed images for pdf-via-typst.
Auto-inject embed_images filter for PDF via Typst. Otherwise
conversion fails because we can't write the images in a temporary
directory in the WASM sandbox. See jgm/pandoc#11584.
2026-04-16 11:38:54 +02:00
John MacFarlane 7d834027d1 Improve wasm Makefile.
It should rebuild js and html when SHA1s change.
2026-04-16 11:26:50 +02:00
John MacFarlane e940ac0ae0 cabal.project - remove patch for basement...
which we no longer need.
2026-03-18 11:17:34 +01:00
John MacFarlane 71bf72a037 Fix wasm build to use ram package instead of memory. 2026-03-18 10:57:30 +01:00
John MacFarlane 2f1b7671fb wasm: change title in web app to "pandoc for the people". 2026-02-12 22:38:19 +01:00
John MacFarlane 7fe6f218a4 Wasm gui: catch errors loading pandoc 2026-02-06 01:25:41 +01:00
John MacFarlane c3b6fc906e Wasm gui: fix bug with Unicode filenames.
Closes #11447.
2026-02-06 01:12:10 +01:00
John MacFarlane 061055d18e wasm gui: Don't block everything while pandoc.wasm loads. 2026-02-05 10:51:30 +01:00
John MacFarlane c8ba761289 wasm app: ensure that input files show up under the file entry box. 2026-02-02 19:07:00 +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
John MacFarlane 648999286d wasm: Rename wasm_main -> convert. 2026-02-02 09:12:14 +01:00
John MacFarlane 961106f61d Change wasm demo path to /app 2026-02-01 15:17:45 +01:00
John MacFarlane bf34bb6dbd Small wasm interface tweaks.
- Add footer.
- Fix convert tabs.
- Add Help link.
- Add Verbosity dropdown.
- Fix console message about files being undefined.
2026-02-01 14:50:50 +01:00
John MacFarlane d86e9ad5df wasm build: Use patches for dependencies...
instead of relying on forks.

The patches themselves are from @TerrorJack's forks of the
corresponding projects.
2026-02-01 14:50:50 +01:00
John MacFarlane 4b26f50118 Add support for compiling pandoc.wasm.
'make pandoc.wasm' will compile a wasm version of pandoc.

This also adds a 'repl' flag to pandoc-lua-engine, so that
support for a Lua repl can be disabled for the wasm build.

A new wasm directory contains:

- pandoc.js, a JavaScript wrapper for pandoc.wasm
- index.html + index.js, a web app exposing all of pandoc's
  functionality in a GUI interface
- a set of illustrative examples that can be loaded from the web app

Most of the code in index.html and index.js has been produced in
interaction with Claude code.
2026-02-01 14:50:50 +01:00