Skip to content

Commit

Permalink
Flow: Recognise [Ss]ymbol as a type (#3388)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonweiting committed Mar 13, 2022
1 parent f8f9534 commit 3916883
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-flow.js
Expand Up @@ -4,7 +4,7 @@
Prism.languages.insertBefore('flow', 'keyword', {
'type': [
{
pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,
alias: 'tag'
}
]
Expand Down
2 changes: 1 addition & 1 deletion components/prism-flow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion tests/languages/flow/type_feature.test
Expand Up @@ -4,6 +4,8 @@ String
string
Boolean
boolean
Symbol
symbol
Function
any
mixed
Expand All @@ -19,6 +21,8 @@ void
["type", "string"],
["type", "Boolean"],
["type", "boolean"],
["type", "Symbol"],
["type", "symbol"],
["type", "Function"],
["type", "any"],
["type", "mixed"],
Expand All @@ -28,4 +32,4 @@ void

----------------------------------------------------

Checks for types.
Checks for types.

0 comments on commit 3916883

Please sign in to comment.