-
Notifications
You must be signed in to change notification settings - Fork 37
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
Switch to a CommonMark compliant parser #54
Comments
I think that if we move to anything, |
This would/should go before any other changes I proposed, as I intended it to be.
It is battle-tested. Any regression would just be mismatching current code. |
This seems like a good step forward, especially if we get footnote support "for free" along with the change. Are you interested in making this PR or should I do it? This should cleanup our codebase quite a bit given that remark has the This would also help close these at |
Could also close #51 |
It seems I'm less familiar with the current state of this/related projects than you, I would appreciate it if you are going for it. |
I'm interested in it. Does remark work without npm specifier in deno? Has anyone tried it? |
Looks great! However, there may be an option to use it directly without a wrapper. Especially when customizability is important, such as dotland/x |
I was playing around with |
@hashrock I see you've been playing around with |
@lino-levan I'd like to see the impact on speed, bundle size, and rendering fidelity of GitHub's README markdown. The rendering of katex is a little strange at the moment. I think maybe I'm using it wrong. |
If I recall correctly, I was getting a similar issue last I checked. Would moving to lowlight be fine? I don't know how important syntax highlighting is outside of it existing. |
Hmm, I'm not sure yet. I think there is no choice but to try rendering the actual GitHub README and accumulate evidence. Another way is to create a separate library that wraps remark. It allows things to move faster and allows projects like deno_blog to choose libraries at their own discretion. |
Study A comparison of remark and marked can be found here: https://github.com/micromark/micromark#comparison
so I checked the bundle size with a script that has roughly the same functionality. https://github.com/hashrock/simulate-github-gfm/blob/main/simple-remark.ts % deno info simple-marked.ts
dependencies: 64 unique
size: 1.37MB % deno info simple-remark.ts
dependencies: 252 unique
size: 1.4MB There isn't much difference in size, but the number of dependencies has increased significantly. I'm thinking that it may affect the initial cache time and deployment time, but the time measured by |
Interesting. Thanks for the notes! |
Marked is not CommonMark compliant. It has improved significantly since I last looked at it, but there are still a few edge cases.
I suggest switching to a CommonMark compliant parser if deno-gfm is aiming for feature parity with GitHub.
There are a few choices:
remark-gfm
solves Add support for footnotes #6 with zero efforts.I won't dive deep here because remark people has written awesome comparisons.
Personally I'm strongly in favor of remark, it makes future development easier than the other choices.
The text was updated successfully, but these errors were encountered: