|
90 | 90 | <key>comment</key> |
91 | 91 | <string>(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$</string> |
92 | 92 | <key>match</key> |
93 | | - <string>([\w-]+)\s?(:)\s([\+~#-])?([\w-]+)(\()([\w-]+)?(~)?([\w-]+)?(~)?\s?([\w-]+)?(\))([*\$])?\s?([\w-]+)?(~)?([\w-]+)?(~)?$</string> |
| 93 | + <string>([\w-]+)\s?(:)\s([\+~#-])?([\w-]+)(\()([\w-]+)?(~)?([\w-]+)?(~)?\s?([\w-]+)?(\))([*\$]{0,2})\s?([\w-]+)?(~)?([\w-]+)?(~)?$</string> |
94 | 94 | <key>captures</key> |
95 | 95 | <dict> |
96 | 96 | <key>1</key> |
|
360 | 360 | </dict> |
361 | 361 | </array> |
362 | 362 | <key>end</key> |
363 | | - <string>(\))([*\$])?\s?([\w-]+)?(~)?([\w-]+)?(~)?$</string> |
| 363 | + <string>(\))([*\$]{0,2})\s?([\w-]+)?(~)?([\w-]+)?(~)?$</string> |
364 | 364 | <key>endCaptures</key> |
365 | 365 | <dict> |
366 | 366 | <key>1</key> |
|
546 | 546 | <key>comment</key> |
547 | 547 | <string>(entity) {</string> |
548 | 548 | <key>begin</key> |
549 | | - <string>\s+([\w-]+)\s+({)</string> |
| 549 | + <string>\s+([\w-]+)\s*({)</string> |
550 | 550 | <key>beginCaptures</key> |
551 | 551 | <dict> |
552 | 552 | <key>1</key> |
|
591 | 591 | </dict> |
592 | 592 | </dict> |
593 | 593 | </dict> |
| 594 | + <dict> |
| 595 | + <key>match</key> |
| 596 | + <string>\%%.*</string> |
| 597 | + <key>name</key> |
| 598 | + <string>comment</string> |
| 599 | + </dict> |
594 | 600 | </array> |
595 | 601 | <key>end</key> |
596 | 602 | <string>(})</string> |
|
607 | 613 | <key>comment</key> |
608 | 614 | <string>(entity) (relationship) (entity) : (label)</string> |
609 | 615 | <key>match</key> |
610 | | - <string>\s*([\w-]+)\s+((?:\|o|\|\||}o|}\|)(?:..|--)(?:o\||\|\||o{|\|{))\s+([\w-]+)\s+(:)\s+((?:"[\w\s]*")|(?:[\w-]+))</string> |
| 616 | + <string>\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-]+))</string> |
611 | 617 | <key>captures</key> |
612 | 618 | <dict> |
613 | 619 | <key>1</key> |
|
1662 | 1668 | </dict> |
1663 | 1669 | <dict> |
1664 | 1670 | <key>comment</key> |
1665 | | - <string>(alt/else/opt/par/and/autonumber)(text)</string> |
| 1671 | + <string>(alt/else/option/par/and/autonumber/critical/opt)(text)</string> |
1666 | 1672 | <key>match</key> |
1667 | | - <string>\s*(alt|else|opt|par|and|rect|autonumber)(?:\s+([^#;]*))?</string> |
| 1673 | + <string>\s*(alt|else|option|par|and|rect|autonumber|critical|opt)(?:\s+([^#;]*))?</string> |
1668 | 1674 | <key>captures</key> |
1669 | 1675 | <dict> |
1670 | 1676 | <key>1</key> |
|
1713 | 1719 | </dict> |
1714 | 1720 | </dict> |
1715 | 1721 | </dict> |
| 1722 | + <dict> |
| 1723 | + <key>comment</key> |
| 1724 | + <string>(box transparent text)</string> |
| 1725 | + <key>match</key> |
| 1726 | + <string>\s*(box)\s+(transparent)(?:\s+([^;#]*))?</string> |
| 1727 | + <key>captures</key> |
| 1728 | + <dict> |
| 1729 | + <key>1</key> |
| 1730 | + <dict> |
| 1731 | + <key>name</key> |
| 1732 | + <string>keyword.control.mermaid</string> |
| 1733 | + </dict> |
| 1734 | + <key>2</key> |
| 1735 | + <dict> |
| 1736 | + <key>name</key> |
| 1737 | + <string>entity.name.function.mermaid</string> |
| 1738 | + </dict> |
| 1739 | + <key>3</key> |
| 1740 | + <dict> |
| 1741 | + <key>name</key> |
| 1742 | + <string>string</string> |
| 1743 | + </dict> |
| 1744 | + </dict> |
| 1745 | + </dict> |
| 1746 | + <dict> |
| 1747 | + <key>comment</key> |
| 1748 | + <string>(box text)</string> |
| 1749 | + <key>match</key> |
| 1750 | + <string>\s*(box)(?:\s+([^;#]*))?</string> |
| 1751 | + <key>captures</key> |
| 1752 | + <dict> |
| 1753 | + <key>1</key> |
| 1754 | + <dict> |
| 1755 | + <key>name</key> |
| 1756 | + <string>keyword.control.mermaid</string> |
| 1757 | + </dict> |
| 1758 | + <key>2</key> |
| 1759 | + <dict> |
| 1760 | + <key>name</key> |
| 1761 | + <string>string</string> |
| 1762 | + </dict> |
| 1763 | + </dict> |
| 1764 | + </dict> |
1716 | 1765 | </array> |
1717 | 1766 | <key>end</key> |
1718 | 1767 | <string>(^|\G)(?=\s*[`:~]{3,}\s*$)</string> |
|
0 commit comments