Highlight.js incorporation?
See original GitHub issueIs there a way to get highlight.js code syntax highlighting rendered in code blocks, like on Github or Discord?
For example:
```js if (foo) { console.log(bar) } ```
Would be coloured with Javascript syntax colours, as seen below, because I specified js after the first ```.
if (foo) {
console.log(bar)
}
Please note that I am not using Node.js, but rather a js file linked to an HTML file on a Github Pages site, so I do not believe that extensions are possible for me. If I am wrong and there is a way to get extensions to load, I would appreciate you sharing it!
Thanks 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
highlight.js demo
Title: Block Copy Routines ;* Version: 1.1 .include "8515def.inc" rjmp RESET ;reset handle .def flashsize=r16 ;size of block to be copied ...
Read more >highlightjs/highlight.js - GitHub
Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It can work with...
Read more >Highlight.js - Trinker's R Blog
js highlights syntax in code examples on blogs, forums and, in fact, on any web page. It's very easy to use because it...
Read more >highlight.js - Reviews, Pros & Cons - StackShare
See what developers are saying about how they use highlight.js. Check out popular companies that use highlight.js and some tools that integrate with ......
Read more >SHJS - Syntax Highlighting in JavaScript
SHJS is a JavaScript program which highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jacobcxdev that particular extension you linked is made exclusively for node because the author is using a non conventional way to load it.
However, it’s trivial to refactor it to make it work in the browser (see fiddle in action)