-
Notifications
You must be signed in to change notification settings - Fork 41
Force code blocks reinitialization #46
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
Conversation
It looks too hacky / error-prone to me. What do you think about alternatives? E.g. use attributes - https://gist.github.com/MartinKavik/713dd5251330e565128b443058d2a5e8? |
I'm fine with attributes. But how about something like this: https://gist.github.com/akhilman/dba0dab68e8c8112ab2d446c7279261b ? It is reusable, portable, self-contain and plug'n'play. |
Or we can drop the github markdown stylesheet and write the style for |
I suggest to use the simplest code for now - that means only attributes and without shadow DOM. However don't delete that gist, we can reuse it during website redesign. |
All right, so I should patch build.rs to put code to attribute. One more option: pre-render code blocks with https://github.com/trishume/syntect . |
I tried syntect before I've migrated syntax highlighting to JS/Web component + build.rs script - it was slow and many languages weren't supported. It should be better now (because syntect core has been migrated to native rust regex crate (if I remember correctly)) but we had discussion about it with a Seed user on chat recently and he also migrated to JS because there were still some problems with that library. |
One more option. Use hash form code itself as |
Interesting solution - I'm not sure if I would recommend it as a best practice to users, but it's simple and elegant - I'm ok with it if it works without problems. |
Yes. Merge it. |
Required for seed-rs/seed#364