This repository was archived by the owner on Dec 25, 2021. It is now read-only.
forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 6
Update highlight.js library with HLSL support and other improvements #1
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Related #2889.
- Use `delphi` instead or add your own aliases
Builds the browser and CDN `highlight.js` as a single unit, as in Rollup sees the entire dependency tree and can optimize it most effectively. Previously we compiled core separately and each languages separately. The final distributable was then a concatenation of all these separate builds - meaning that often it could include repeated code from grammars pulling in the same dependencies (regex libs, etc.) The common build (minified) is now 20kb smaller which results in a 4-5kb reduction in the gzip size.
Resolves #3023. The prior behavior was inconsistent. Sometimes the language would not get added at all. Language is now always added, and always prefixed. Ie, when highlighting with csharp then language-csharp would be added to the code element's className. This also applies to sublanguage span tags which now will have the language- prefix appended as well. Note: classPrefix does not apply here, that is only used for themeing classes, not for language classification.
…ts (#3007) - drops the legacy `lib/highlight.js` - build ES modules in `es` folder side-by-side with `lib` for CJS - adds `lib/common` - loader is no longer supported, languages must `export default` or equiv - add --no-esm build option (for speed) - add `.js.js` stubs for maximum compatible with requires using extensions
* enh(swift) add @resultBuilder attribute This feature will land in Swift 5.4 -> https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md * (swift) add @resultBuilder markup test
* add(wasm) WebAssembly support * (chore) add web category
Version 2.28 related: * complex and array types * complex numbers * added all new functions and distributions Other Improvements: * highlighting of constants * highlighting for user defined distributions * highlighting for truncation Co-authored-by: Josh Goebel <[email protected]>
- also add `title.function.invoke` to the official list (Rust was already using)
- remove unnecessary `class` scope - add `;` as punctuation - remove deprecated `function` scope - use `title.function` for function names
When you clicked the badge it took you to "beginner friendly" instead of "good first issue"
thanks for the PR, but this fork only existed to upstream a security fix. we no longer rely on it. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am a graphics programmer and use Discord daily for solving problems and sharing code snippets with other developers in professional and educational settings.
While Discord's syntax highlighting is very helpful in this regard, it is lagging behind on highlight.js library's advancements by well over 1 year now. Many improvements, bugfixes and support for a number of new language grammars have been added to highlight.js since the last revision --one of the most important to the game developer industry being HLSL High-level shader language (HLSL.) it is currently the most ubiquitous language that shader code is authored in, in large part by its use in the Unity and Unreal real-time engines.
HLSL support in particular was added in version 10.7.0, with 10.7.3 being the last version before possible breaking changes arrived in 11.0.0. Or maybe you'll prefer to upgrade to the latest, It's up to you.
highlightjs#3002
https://github.com/highlightjs/highlight.js/blob/2dd87a6ef58c8c886dd209076aa6661ffae89577/CHANGES.md
https://support.discord.com/hc/en-us/community/posts/1500001411122-Update-highlight-js-library-to-10-7-1-bringing-HLSL-support-to-Game-developers-everywhere
Updating highlight.js has a relatively low effort and low risk factor but would benefit so many of us that work on videogames and interactive media using Discord to communicate everyday.
Feel free to close this draft PR and open up a new one as needed when this work can be done and from the best branch or commit, etc, I'm just making sure this actually is brought to the attention to fellow software developers as there has been no response to this via the support.discord.com and twitter.com/discord so I have no idea if the development team is even aware of these advancements and the difference it would make in the community.
Thank you