Commit 02a61be
authored
fix: stop truncating the body in presence of dashes (#3476)
* test(parser): add failing test
* fix: stop truncating the body in presence of dashes
In the current version of commitlint the body is truncated
unexpectedly when there is a pattern like
'- Something between dashes -' in the commit message body.
The reason for this behavior is that in the commit parser
package the commitlint uses (conventional-commit-parser[1]),
this pattern '- something -' is a special pattern for any
arbitrary filed. For example, if you put '-myNote-' in the
commit message body, everything that comes after this field
will be saved in an arbitrary field called myNote (Or
whatever is written between dashes) and you can use it like
other fields (header, body, etc.), but I believe we should
disable this functionality because, in the commit messages
like the one in the bug report that this commit fixes, the
user might put stack trace in the commit message body and
this way it will be truncated unexpectedly.
Fixes #3428
[1] https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/README.md1 parent 0a53d97 commit 02a61be
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
171 | 190 | | |
172 | 191 | | |
173 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments