Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
scope: allow leading dot '.'
Browse files Browse the repository at this point in the history
  • Loading branch information
skenqbx committed Jan 27, 2016
1 parent 075e10d commit 10b13da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function ChangeLog(opt_options) {

this._subjectRE = /(subject":)((".*"),"author")/;
this._bodyRE = /("body":)(".*")\}/;
this._scopeRE = /^([a-zA-Z0-9]+[a-zA-Z0-9\/\._-]*)(?:,\s*[a-zA-Z0-9]+[a-zA-Z0-9\/\._-]*)*:/;
this._scopeRE = /^([a-zA-Z0-9\.]+[a-zA-Z0-9\/\._-]*)(?:,\s*[a-zA-Z0-9]+[a-zA-Z0-9\/\._-]*)*:/;
this._format = '{"hash":"%H","time":%at,"subject":"%s","author":{"name":"%an","email":"%ae"},"body":"%b"}';
}
module.exports = ChangeLog;
Expand Down
5 changes: 3 additions & 2 deletions test/test-scopes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ suite('scopes', function() {
'hello, world:', 'hello, world:',
'hello, world: hello world', 'hello, world:',
'/hello, world: abc', false,
'.hello, world: abc', false,
'.hello, world: abc', '.hello, world:',
',hello, world: abc', false,
'_hello/world: abc', false,
'abc.world: abc', 'abc.world:',
'abc/world: abc', 'abc/world:',
'abc-world: abc', 'abc-world:'
'abc-world: abc', 'abc-world:',
'.eslintrc: stuff', '.eslintrc:'
];

for (i = 0; i < subjects.length; i += 2) {
Expand Down

0 comments on commit 10b13da

Please sign in to comment.