Add some missing keywords for mdBook syntax highlighting (#2903)

Add some missing keywords to the `sway.js` file. This was triggered by
@Braqzen noticing some inconsistent highlighting in the generated MD
books.

Doesn't address custom types not being highlighted but that can be for a
future PR.
This commit is contained in:
Joshua Batty 2022-09-30 14:23:06 +10:00 committed by GitHub
parent 49b9e7e5a3
commit 58f2021ad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -25,19 +25,24 @@ export default function(hljs) {
"abi",
"as",
"asm",
"break",
"const",
"continue",
"contract",
"dep",
"deref",
"else",
"enum",
"fn",
"for",
"if",
"impl",
"let",
"library",
"match",
"mut",
"else",
"predicate",
"pub",
"ref",
"return",
"script",
@ -54,6 +59,10 @@ export default function(hljs) {
const LITERALS = [
"true",
"false",
"Some",
"None",
"Ok",
"Err",
];
const BUILTINS = [