Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code-prettify dart highlighting #1624

Merged
merged 1 commit into from
May 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/_assets/js/vendor/code-prettify/lang-dart.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ PR['registerLangHandler'](
// Script tag.
[PR['PR_COMMENT'], /^#!(?:.*)/],

// `import`, `library`, `part of`, `part`, `as`, `show`, and `hide`
// `deferred`, `export`, `import`, `library`, `part of`, `part`, `as`, `show`, and `hide`
// keywords.
[PR['PR_KEYWORD'], /^\b(?:import|library|part of|part|as|show|hide)\b/i],
[PR['PR_KEYWORD'], /^\b(?:deferred|export|import|library|part of|part|as|show|hide)\b/i],

// Single-line comments.
[PR['PR_COMMENT'], /^\/\/(?:.*)/],

// Multiline comments.
[PR['PR_COMMENT'], /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], // */

// `class` and `interface` keywords.
[PR['PR_KEYWORD'], /^\b(?:class|interface)\b/i],
// `class`, `enum`, `interface`, and `mixin` keywords.
[PR['PR_KEYWORD'], /^\b(?:class|enum|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|return|super|switch|sync|this|throw|try|while)\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|while|yield)\b/i],

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

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

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