Skip to content

Commit f6bcb34

Browse files
committed
YAML fix order of applying regexes for tags
1 parent e67b925 commit f6bcb34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/languages/yaml.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ export default function(hljs) {
7474
excludeEnd: true,
7575
relevance: 0
7676
},
77-
{ // local tags
77+
{ // "named" tags
7878
className: 'type',
79-
begin: '!' + YAML_TAG_RE,
79+
begin: '!\w+!' + YAML_TAG_RE,
8080
},
8181
{ // "global" tags (data types)
8282
className: 'type',
8383
begin: '!!' + YAML_TAG_RE,
8484
},
85-
{ // "named" tags
85+
{ // local tags
8686
className: 'type',
87-
begin: '!\w+!' + YAML_TAG_RE,
87+
begin: '!' + YAML_TAG_RE,
8888
},
8989
{ // fragment id &ref
9090
className: 'meta',

0 commit comments

Comments
 (0)