Simplify parsing by preventing `!` in Tyoe?
Currently, the grammar only prevents the sequence !:. So someone could have a type like He!!o.
::= <any UTF8-octets except newline or parens or ":" or "!:" or whitespace>+
Personally, I would find this confusing to see but it also would greatly simplify this grammar rule to only be looking at characters rather than sequence of characters.
Using ! in the type to indicate a breaking change is part of the Conventional Commit standard...
https://www.conventionalcommits.org/en/v1.0.0/?ref=blog.formacao.dev#commit-message-with--to-draw-attention-to-breaking-change
Why would we want to prevent it?
My suggestion is to make this change
- ::= <any UTF8-octets except newline or parens or ":" or "!:" or whitespace>+
+ ::= <any UTF8-octets except newline or parens or ":" or "!" or whitespace>+
The idea being that a message like:
He!!o: some message
is both odd (harder to parse by computer and human) and inconsistent in what it allows as you can't then do
He!!: some message
without there being a semantic change
As I understand it, indicating a breaking change is meant to be a single ! after the type, e.g. feat!: some commit message.
I ended up here by mistake though, the package I am needing to fiddle with is actually https://www.npmjs.com/package/conventional-commits-parser.