So I just wasted a morning trying to debug why the Highlight.js syntax highlighting in Kitten suddenly began to fail only to realise that @1password is stripping the hljs- prefixes from the class names.

You can see this for yourself if you have the 1password extension installed at:

https://kitten.small-web.org/#the-ubiquitous-counter-example

Load that page with 1password enabled in your browser and you will see that the syntax highlighting doesn’t work and the hljs- prefixes have been stripped.

Disable the 1password extension and load the page again and you will see syntax highlighting working properly.

WTF?!

#1password #browser #extension #highlightJS #Kitten

Kitten: Home

If you ever wanted syntax highlighting support for #Rego while using highlight.js.. now you can: https://github.com/StyraInc/highlightjs-rego

#opa #devops #javascript #cloudnative #highlightjs

GitHub - StyraInc/highlightjs-rego: Syntax highlighting for Rego

Syntax highlighting for Rego. Contribute to StyraInc/highlightjs-rego development by creating an account on GitHub.

GitHub
A Copy Button For Highlight.js (English)

Scott Galloway is a lead developer and software engineer with a passion for building web applications.

@Una @argyleink Awesome! We no longer need #CSS Custom Highlight API nor #PrismJS nor #HighlightJS for syntax highlighting thanks to @gdc!

🗞️ Coming soon: the next release of Highlight.js will officially support Unison syntax highlighting, so we should be seeing even more Unison code out there in the world.

BTW, if you simply cannot wait to style Unison snippets on your website, you can do so right now with https://github.com/runarorama/highlightjs-unison
#highlightjs #unisonlang

GitHub - runarorama/highlightjs-unison: A Unison language grammar for highlight.js

A Unison language grammar for highlight.js. Contribute to runarorama/highlightjs-unison development by creating an account on GitHub.

GitHub

Quick heads up, highlight.js now correctly highlights code in namespaced tagged template strings (e.g., kitten.html``, kitten.css``, etc.)

https://github.com/highlightjs/highlight.js/pull/4002

(And Kitten comes with highlight.js baked in. See it in use in this example: https://codeberg.org/kitten/app/src/branch/main/examples/markdown/index.page.js#L24 and please ignore the warnings on that page, there’s nothing wrong with the code, it’s a long-standing @Codeberg bug where proper typography in comments and strings is flagged as errors. Embarrassing.)

#highlightJS #Kitten #SmallWeb

Support namespaced tagged template strings in JavaScript by aral · Pull Request #4002 · highlightjs/highlight.js

Resolves #4001 Changes Instead of just matching html and css (and, for completeness and consistency, gql), \.?html, \.?css, and \.?gql are matched, which allows for namespaced tagged template strin...

GitHub
Any #PostCSS users know how I can include other CSS files with a prefix. Use case is that I want to import two files - light and dark themes for #highlightjs, but dark mode needs all selectors to be scoped with an additional `.dark` class prefix
I'm playing with #pyodide (https://pyodide.org), so that users can try out my Python packages directly into the docs pages! The editor is #ace (https://ace.c9.io/), and the output is highlighted with #highlightjs (https://highlightjs.org/). I'm trying to improve the look and feel but it's already amazing.
Pyodide — Version 0.29.3

#highlightjs is a #dependencyless #JavaScript code highlighter.

highlight.js is a clientside source code highlighter that does not depend on any frameworks. highlight.js can be easily used in scripts and webpages by simply using the prebuilt minified source. highlight.js supports hundreds of languages, has many themes, and supports programming language detection.

Website 🔗️: https://highlightjs.org/

#free #opensource #foss #fossmendations #library #programming #webdev

highlight.js

The Internet's favorite JavaScript syntax highlighter supporting Node.js and the web.