Skip to content

Commit

Permalink
🤖: update grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Nov 10, 2023
1 parent 310c93b commit b81bc41
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/shiki/languages/mermaid.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"comment": "(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$",
"match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(\\()([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$",
"match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(\\()([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?(\\))([*\\$]{0,2})\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$",
"captures": {
"1": {
"name": "entity.name.type.class.mermaid"
Expand Down Expand Up @@ -215,7 +215,7 @@
}
}
],
"end": "(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$",
"end": "(\\))([*\\$]{0,2})\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$",
"endCaptures": {
"1": {
"name": "punctuation.parenthesis.closed.mermaid"
Expand Down Expand Up @@ -331,7 +331,7 @@
},
{
"comment": "(entity) {",
"begin": "\\s+([\\w-]+)\\s+({)",
"begin": "\\s+([\\w-]+)\\s*({)",
"beginCaptures": {
"1": {
"name": "variable"
Expand All @@ -358,6 +358,10 @@
"name": "string"
}
}
},
{
"match": "\\%%.*",
"name": "comment"
}
],
"end": "(})",
Expand All @@ -369,7 +373,7 @@
},
{
"comment": "(entity) (relationship) (entity) : (label)",
"match": "\\s*([\\w-]+)\\s+((?:\\|o|\\|\\||}o|}\\|)(?:..|--)(?:o\\||\\|\\||o{|\\|{))\\s+([\\w-]+)\\s+(:)\\s+((?:\"[\\w\\s]*\")|(?:[\\w-]+))",
"match": "\\s*([\\w-]+)\\s*((?:\\|o|\\|\\||}o|}\\||one or (?:zero|more|many)|zero or (?:one|more|many)|many\\((?:0|1)\\)|only one|0\\+|1\\+?)(?:..|--)(?:o\\||\\|\\||o{|\\|{|one or (?:zero|more|many)|zero or (?:one|more|many)|many\\((?:0|1)\\)|only one|0\\+|1\\+?))\\s*([\\w-]+)\\s*(:)\\s*((?:\"[\\w\\s]*\")|(?:[\\w-]+))",
"captures": {
"1": {
"name": "variable"
Expand Down

0 comments on commit b81bc41

Please sign in to comment.