Comments (9)
I was going to suggest basing such an AST on the output of typify for the json-schema generated from typescript definitions in djot.js, but typify doesn't parse it.
Having an internal AST like this, as well as being able to consume and produce it in JSON form, would allow the use of jotdown as a library to write filters as standalone binaries:
djot -t json mydoc.dj | myrustbinary | djot -f json > index.html
from jotdown.
I was going to suggest basing such an AST on the output of typify for the json-schema generated from typescript definitions in djot.js, but typify doesn't parse it.
It would be nice if the AST types could be generated automatically. The only work needed would be to convert between AST and events.
Having an internal AST like this, as well as being able to consume and produce it in JSON form, would allow the use of jotdown as a library to write filters as standalone binaries:
djot -t json mydoc.dj | myrustbinary | djot -f json > index.html
If one wants to manipulate an AST, I guess jotdown (which is mainly a parser) is not really needed here. Just need some AST types that can be serialized and deserialized.
from jotdown.
I tried two additional conversion tools:
- quicktype, both with typescript and json schema input
- typester, which isn't intended to be used in production
None of them parsed (or at least completed), so am wondering if there's something funky about that ast definition?
If one wants to manipulate an AST, I guess jotdown (which is mainly a parser) is not really needed here. Just need some AST types that can be serialized and deserialized.
So in a scenario like this, jotdown would just be able to output the same AST as djot.js, and any filtering would be done independently?
I'm wanting to implement citation and bibliography processing using djot for this project I'm working on, once John adds supports for citations, so just wondering how that might work.
from jotdown.
from jotdown.
I just posted a linked issue over there.
from jotdown.
Related Issues (20)
- `Render` trait HOT 5
- Emit events for link definitions HOT 4
- bug: attributes disappear from raw inline
- bug: disappearing attributes
- CowStr HOT 2
- Provide C API HOT 2
- bug: formatting is kept in link reference text tag
- Render from borrowed events? HOT 3
- Expose tag for unresolved links in Event
- Emit Footnotes as they are encountered
- impl IntoIterator for Attributes HOT 2
- bug: consecutive attributes are ignored HOT 1
- Attributes are parsed inside math HOT 2
- Comments don't work with headings HOT 1
- paragraph tags disappear after numbered list
- Ambiguity between alphabetical and Roman numeral lists HOT 3
- Provide a shortcut to just render to String HOT 2
- Escapes in inline links
- Multi-line block attributes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jotdown.