Conversation
Jay, I had a test for this 😄
|
Can we update highlight.js to get more languages? I really wish urlencoded highlighting were supported (I believe it's possible). (I'm not blocking on this, just don't have time to properly review this morning and wanted to ask before I forgot) |
We are already using the latest version of highlight.js, and we can either try to find a supported language that looks nice for URL templates and query parts, or register a custom language for it: Both approaches would require to differentiate between |
|
At least some packages have plugins for urlencoded. Not sure I’ve seen uritemplates but yes def different format! |
|
@handrews Copied some snippets I found on StackOverflow and it now looks better than all-black or all-red. If you have a better copy template, please tell me. |
handrews
left a comment
There was a problem hiding this comment.
Thanks, @ralfhandl this is fantastic! I verified it in a local build.


We intentionally format code blocks with
highlight.jsif the explicitly specified language of the code block is known to this package.Formerly we left highlighting of unknown languages or code blocks with unspecified language to ReSpec, which now leads to erratic results, see #4103.
This PR suppresses automatic syntax highlighting by ReSpec for code blocks whose language is not specified or unknown to
highlight.js.It also adds two custom languages
urianduritemplatethat are used inPreview: