Skip to content

Commit

Permalink
Handle leading whitespace in diff line (OctoLinker#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbuck authored Dec 7, 2017
1 parent 07dfc9f commit 18fac59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/helper-grammar-regex-collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const captureJsQuotedWord = regex`
`;

const diffSigns = regex`
^[\+\-]?
^[ \t]*[+-]?
`;

const importMembers = regex`[\r\n\s\w{},*\$]*`;
Expand Down
2 changes: 1 addition & 1 deletion packages/helper-grammar-regex-collection/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function fixturesIterator(fixturesList, next) {

function addModifiedLines(valid) {
const [text, expected] = valid[0];
const diffLines = [[`-${text}`, expected], [`+${text}`, expected]];
const diffLines = [[` -${text}`, expected], [` +${text}`, expected]];

return [].concat([], diffLines, valid);
}
Expand Down

0 comments on commit 18fac59

Please sign in to comment.