Replies: 10 comments 3 replies
-
No, there isn't, just the Lua. It should be possible to write a JS implementation that closely follows the Lua implementation, so if you'd like to try this, be my guest! Some notes on where I think the difficulties would lie:
|
Beta Was this translation helpful? Give feedback.
-
Perhaps this should be moved over to discussions. I could probably donate a few hours (2-4h) on this. I've also searched for Lua to JS tools; many seemed to be abandoned. But this could be a first step - investigate what is available. |
Beta Was this translation helpful? Give feedback.
-
I'm interested in seeing where this goes. However, I'm currently considering simply running the Lua version on webassembly via wasmoon. If I pursue this to a working result, I may follow up here with a link for anyone interested. |
Beta Was this translation helpful? Give feedback.
-
Note: on the sandbox (https://djot.net/playground/) we use a wasm blob converted by emscripten from Lua sources and a small C library that just uses Lua and the djot Lua code. It amounts to roughly 350K of wasm and js code and performs pretty well. Obviously a native js implementation would be nicer (smaller, faster, more extensible), but if you just want to use djot on the web this works. (Previously we used wasmoon -- that works too.) |
Beta Was this translation helpful? Give feedback.
-
I got as far as translating one module: https://github.com/jgm/djot.js |
Beta Was this translation helpful? Give feedback.
-
I have implemented inline and block event parsers now in djot.js. Next step: ast. |
Beta Was this translation helpful? Give feedback.
-
The typescript implementation (jgm/djot.js) is now complete, and I've got it running on the playground, You can try it at https://djot.net/playground. It appears to be roughly |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what you mean. I get this:
Are you seeing something different? Metadata is something to consider for the future.
|
Beta Was this translation helpful? Give feedback.
-
It should also work without the square brackets.
|
Beta Was this translation helpful? Give feedback.
-
OK, djot.js is now in pretty good shape, and includes a command line tool that can convert between djot and pandoc JSON. (So with this + pandoc you can convert just about anything to djot and vice versa.) Check it out at https://github.com/jgm/djot.js.) |
Beta Was this translation helpful? Give feedback.
-
Hi!
I like a lot the way djot language is defined, and I would like to try it out in web projects.
Is there a JS implementation?
If not, i'm happy to collaborate => suggestions welcome.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions