-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider remark #20
Comments
oo yes, the plugins are a big draw |
Yeah, that is my main motivation too. Barring any revelations, this will probably happen. |
also todo: enforce (or make very very easy to add) some good defaults like header tags having ID's, and sections having sections: |
It should be very simple to install these kinds of plugins, autolink headings kind of makes sense for content sites and so could be made available as an option. I'm not sure about automatic sections though, sounds too opinionated, a user could easily bring that in themselves.
|
totally. i was stuck thinking about mdx as content rather than mdx as sfc's. i really like that analogy (mdx as a sfc superset) |
This was a biggy. Done in 0.8. |
what a journey! |
The decision to use
markdown-it
was relatively arbitrary when I put this together initially: the performance was okay and there are a decent array of plugins. I've found it pretty annoying over time, however, and have been investigating alternatives.marked
is the obvious candidate due to its focus on performance (performance is a concern for sites with more content) but there don't seem to be as many plugins and I don't want to limit what users can actually do with MDsveX, although it does have a decent API.remarkable
is another candidate and, if performance is the priority, might a better option.In that vein, I began investigating other solutions.
remark
was my initial preference but I assumed (without any testing whatsoever) that it would be quite a bit slower due to the fact it builds an AST, but my very basic benchmarks have shown this to be a false assumption. It seems to be just as fast asmarked
in my preliminary tests (these tests include writing to an HTML string). What is more, there are a huge array of plugins available and having access to an AST gives a huge amount of flexibility when it is needed.remark
will almost definitely have higher memory consumption than a simple lexer/parser with no intermediary AST but this seems to be a trade-off that people are willing to make. There is precedent here as MDX uses Remark and no-one seems to mind much, although what is palatable to one community is not necessarily so for another.I'll look into this over the coming weeks and take a closer look at the impact this change would have on both build times and memory consumption, the plugin ecosystem seems healthy (which matters quite a bit) but I'll do some more research in that regard as well. When I have more concrete data on the tradeoffs between the two I will make a decision.
The text was updated successfully, but these errors were encountered: