-
Notifications
You must be signed in to change notification settings - Fork 119
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
Update highlight.js and add support for plain text and C #2560
Update highlight.js and add support for plain text and C #2560
Conversation
Also include plaintext as we currently don't have support for that and switch to a new API call as the old one is now deprecated
Add a screenshot or two of docs with the the new highlight.js active? |
@jcollins-g I've added a screenshot of the main goal of adding support for plaintext. Dart highlighting should be the same as before. |
I'm converting this to a draft because as I was going through SDK docs I realized we should likely include support for C as well due to ffi becoming stable. |
@jcollins-g This is ready for review. I was preparing a CL tagging all code blocks in the SDK and I found not only |
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.
Hmm. I'm not able to verify the highlight pack. The diff is challenging to read, but I think the one you uploaded includes Kotlin which is not in the list of languages from the readme.
@jcollins-g For me the README seems to include Kotlin, I believe for Flutter plugin documentation purposes. Let me know if you'd like my to remove it though. Thanks! |
Oh, my mistake, you are correct of course. I must have not clicked on the right buttons. And now I can not verify it because the version has changed since you put the PR in. Can you update from the website? |
@jcollins-g Strangely for me, re-downloading all of the selected languages does not result in a change of the file. The following are the languages I have selected according to the README(including the additions of C and Plaintext). Did you account for adding support for C? If it still doesn't match after that, feel free to download your own and commit to this branch, you should have access: Sorry that this process has been troublesome! |
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.
I was on the wrong branch in my clone of your fork for this PR.
This update process needs to be added to the grinder so the verification is not manual every time; too many opportunities to make an error.
@jcollins-g Next time I work with highlighting I'll get something figured out for automatic updating and/or verification. Thanks for sticking with me! |
This update doesn't have too many improvements for us, but we are lacking support for plain text and C so to add support for that using their optimized builds, needed to update at the same time.
You can verify the minified
highlight.js
pack if desired by going to https://highlightjs.org/download/ and checking all supported languages(found inreadme.md
).You can find this highlight.js update's changelog here: https://github.com/highlightjs/highlight.js/releases/tag/10.6.0
The main desire is to get support for
plaintext
andc
but there's also small improvements in theswift
andxml
grammars as well as the more reliablehighlightAll
API.Some dart examples using
plaintext
instead: