-
Notifications
You must be signed in to change notification settings - Fork 189
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
Fix escape character #2468
Fix escape character #2468
Conversation
76b691c
to
08e0155
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kevan-Y I have question for you. What if language has not been detected on the syntax-highlight.js
?
highlight.js library, have an auto-detect language. This is the [languages support] (https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md), but can also set what language to be used |
881ab72
to
b7a2e02
Compare
Rebased to master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: our front-end uses the CSS for this, do we need to do an update in src/web/* as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it's already updated,
telescope/src/web/package.json
Line 20 in 411543e
"highlight.js": "11.3.1", |
Issue This PR Addresses
Fixes #2457
Type of Change
Description
The current way of doing it causing some weird bug.
highlightAuto()
seems to run an encode to change value to escape character. And when we have our data with preset syntax-highlightspan
. It is converting weirding.For example:
Will convert to
I upgraded to the latest version, it kind of fixed itself but some didn't.
Finally solution was to change to use this https://highlightjs.readthedocs.io/en/latest/api.html#highlightelement
That will highlight the syntax+ add class (for language) in code tag instead of pre tag.
Checklist