Skip to content

Commit

Permalink
alpha 18
Browse files Browse the repository at this point in the history
rules from actions fixed

:boar:
  • Loading branch information
jifeon committed Feb 13, 2016
1 parent 260cf9e commit 94aba50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lib/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,9 @@ Parser.prototype = {
}
debug('Rules extracted from action %o', rule);
// use child transform or parent transform or nothing
const transform = actionsResults.transform || rule.transform || false;
rule = actionsResults;
rule.transform = transform;
return this._processRule(rule);
actionsResults.transform = actionsResults.transform || rule.transform || false;
}
return this._parseScope(rule, offset, actionsResults);

This comment has been minimized.

Copy link
@maZahaca

maZahaca Feb 14, 2016

Member

I don't understand. Why before we parse rule, but now all time we parser actionsResults. What about cases, which don't have actions? or so?
Also it looks strange
(actionsResults, offset, actionsResults)

I believe it fixes something, but I have doubts that it breaks something either.

This comment has been minimized.

Copy link
@jifeon

jifeon Feb 14, 2016

Author Contributor

yep yep, your case is fixed in next commit, golden eye

return this._parseScope(actionsResults, offset, actionsResults);
}, this)
.then(function (results) {
parseResults = results;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"email": "balakirev.andrey@gmail.com"
}
],
"version": "0.2.0-alpha.17",
"version": "0.2.0-alpha.18",
"repository": {
"type": "git",
"url": "git+https://github.com/redco/goose-parser.git"
Expand Down

2 comments on commit 94aba50

@jifeon
Copy link
Contributor Author

@jifeon jifeon commented on 94aba50 Feb 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maZahaca for review, redundant _processRule added unnecessary empty scope, it was lead to problems with parsing rows. Selectors was build wrong way, like .row :eq(0) instead of .row:eq(0)

@maZahaca
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have seen

Please sign in to comment.