|
|
%!s(int64=3) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| README.md | 1f075a1348 Add a language definition for highlight.js. (#1365) | %!s(int64=3) %!d(string=hai) anos |
| highlightjs_carbon_lang.js | 0ed6600615 [highlightjs] Add struct literal support. (#1370) | %!s(int64=3) %!d(string=hai) anos |
| highlightjs_example.html | 0ed6600615 [highlightjs] Add struct literal support. (#1370) | %!s(int64=3) %!d(string=hai) anos |
This directory collects syntax highlighting utilities for use with Carbon code.
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.