Files
Richard Smith 90125b12fd Update words.md with keywords from approved proposals and update syntax highlighters (#7861)
Extend the design's keyword list with the keywords from all the approved
proposals to date. Update our four syntax highlighters to have matching
keyword lists.

There are a few other stale things in some of the syntax highlighters;
those are not fixed here.

Assisted-by: Claude via Antigravity
2026-10-01 01:05:22 +00:00
..

Highlighting utilities

This directory collects syntax highlighting utilities for use with Carbon code.

highlight.js

This JavaScript syntax highlighting system is used on webpages or in presentation software like reveal.js.

The code is in highlightjs_carbon_lang.js, and you can use it by registering it after you load highlight.js:

<script type="module">
    import Carbon from './highlightjs_carbon_lang.js';
    hljs.registerLanguage('Carbon', Carbon);
    hljs.highlightAll();
</script>

See highlightjs_example.html for a more complete example.

It includes many Carbon-specific markup indicators that may be useful to customize display or highlighting of Carbon code.