Skip to content

Commit 2474065

Browse files
authored
feat: allow U+FF1A as subject prefix separator (#59)
1 parent 6bd8196 commit 2474065

File tree

4 files changed

+136
-117
lines changed

4 files changed

+136
-117
lines changed

corpus/subject.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,16 @@ amend! feat: allow fixup
210210
(subject_prefix)
211211
(prefix
212212
(type))))
213+
214+
================================================================================
215+
Allow U+FF1A as colon separator
216+
================================================================================
217+
feat(hi):some message
218+
219+
--------------------------------------------------------------------------------
220+
221+
(source
222+
(subject
223+
(prefix
224+
(type)
225+
(scope))))

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = grammar({
5050
alias($._conventional_type, $.type),
5151
optional(seq('(', alias(SCOPE, $.scope), ')')),
5252
optional('!'),
53-
':'
53+
alias(/[:\uff1a]/, ':')
5454
),
5555

5656
_body_line: ($) =>

src/grammar.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,12 @@
242242
]
243243
},
244244
{
245-
"type": "STRING",
245+
"type": "ALIAS",
246+
"content": {
247+
"type": "PATTERN",
248+
"value": "[:\\uff1a]"
249+
},
250+
"named": false,
246251
"value": ":"
247252
}
248253
]

0 commit comments

Comments
 (0)