Skip to content

Commit

Permalink
Add support for new Dart features to prettify (dart-lang#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Mar 20, 2023
1 parent 0e42e66 commit 54e9907
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/_assets/vendor/code-prettify/lang-dart.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ PR['registerLangHandler'](
[PR['PR_KEYWORD'], /^\b(?:class|enum|extension|interface|mixin)\b/i],

// General keywords.
[PR['PR_KEYWORD'], /^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|on|rethrow|return|super|switch|sync|this|throw|try|while|yield)\b/i],
[PR['PR_KEYWORD'], /^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|on|rethrow|return|super|switch|sync|this|throw|try|when|while|yield)\b/i],

// Declaration keywords.
[PR['PR_KEYWORD'], /^\b(?:abstract|const|covariant|extends|external|factory|final|get|implements|late|native|operator|required|set|static|typedef|var|with)\b/i],
[PR['PR_KEYWORD'], /^\b(?:abstract|base|const|covariant|extends|external|factory|final|get|implements|inline|interface|late|native|operator|required|sealed|set|static|typedef|var|with)\b/i],

// Keywords for types.
[PR['PR_TYPE'], /^\b(?:bool|double|dynamic|Function|int|Never|Null|num|Object|String|Symbol|Type|void)\b/i],
[PR['PR_TYPE'], /^\b(?:bool|double|dynamic|Function|int|Never|Null|num|Object|Record|String|Symbol|Type|void)\b/i],

// Keywords for constants.
[PR['PR_KEYWORD'], /^\b(?:false|null|true)\b/i],
Expand Down

0 comments on commit 54e9907

Please sign in to comment.