-
Notifications
You must be signed in to change notification settings - Fork 508
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
Can we support rendering of pug templates? #6763
Comments
w.r.t. Prism highlighting support. Prism has a component for virtually every non-esoteric language, so the only blocker is whether we want to include that in our bundle or not. I wish there's a better workflow to assess the tradeoffs of adding each language. My stance is that we should add every language that ought to be added (e.g. we should have Even better—I wonder if we can code-split by Prism components, so we don't have to worry about bundle size too much. |
Ah, you're right it's there: https://prismjs.com/#supported-languages So let's find out the cost. But honestly, we're talking very few pages of relatively easy to read and parse text with pug. So if the cost is at all significant it isn't worth paying. |
Still, from a semantic point of view, I'd say marking code blocks as languages Yari doesn't support is strictly better than marking it as I don't know if that's what mdn/content#18744 was talking about. |
Also see
I'm not sure how far we can progress things without knowing if languages are a per-page or every-page cost. |
Fixed by #6831. |
Summary
There are some pug template code blocks in https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Displaying_data/LocalLibrary_base_template that are marked as plain because yari doesn't support pug syntax highlighting.
If it were easy and not "costly" to support pug as well that would be good. I am not sure it would be easy/I think it is not supported, but just checking.
This came out of mdn/content#18744
URL
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Displaying_data/LocalLibrary_base_template
Reproduction steps
Open a page, use ```pug to highlight some pug text. Url above is good. It renders as plain.
Expected behavior
Would be nice to render pug if we can
Actual behavior
We can't :-)
Device
Desktop
Browser
Chrome
Browser version
Stable
Operating system
Windows
Screenshot
No response
Anything else?
No response
Validations
The text was updated successfully, but these errors were encountered: