-
Notifications
You must be signed in to change notification settings - Fork 579
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
Replace prettify.js with something maintained #1544
Comments
Let me try working on this 💪 Is highlight.js still preferred, or should we be also looking for other libraries? |
No preference really, it just should be maintained and work well. |
Cool, I just pulled in @dotandimet's old PR, pruning out the old PODRenderer-related changes and updated with Since its a 5-year-old PR though I'll check on the highlight.js itself for library upgrades and other changes... |
Don't forget to check template/HTML highlighting too. |
Yep, was just about to check in on that: This is on latest highlight.js 10.2.1 a bit of tweaking on the CSS and |
Would be nice to get mojolicious.org updated too. |
Got around to trying this with mojolicious.org now, unforuntately it looks like the similar situation (or worse) in #737 (comment): Types/package names and Has to do with the engine itself, not recognizing the right tokens: vs Guess I'll block #1578 for now and look at the other aforementioned alternative (prism.js) to check... |
That does look quite a bit better than #737 (comment) at least. |
Yeah, on second thought... checking on mojodocs now, it does seem that highlightjs is more consistent for the embedded templates, e.g. for https://docs.mojolicious.org/Mojolicious/Guides/Rendering#Template-inheritance: vs Even with the lack of highlights for types, for highlightjs at least it looks a lot less Angry Fruit Salad. Let me post my current mojolicious.org changes now for further discussion 👍 |
For syntax highlighting on the exception page we still use prettify.js, which like most Google projects has been abandoned. So we should really replace it with something better, like highlight.js.
There was actually an attempt before, but it failed because of interdependencies with mojolicious.org. That is no longer a problem, because assets are not shared anymore.
For testing you can use the included example app
examples/responses.pl
(perl -Ilib examples/responses.pl daemon
). The screenshot above was taken of a request forhttp://127.0.0.1:3000/res5
.The text was updated successfully, but these errors were encountered: