Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing modifiers with context of block/elem #289

Merged
merged 2 commits into from
Mar 28, 2018

Conversation

Yeti-or
Copy link
Member

@Yeti-or Yeti-or commented Mar 12, 2018

Previous decision was wrong we actually need to extract main entity
Check this issue: bem/webpack-bem-loader#64
Natural dependencies were broken

@Yeti-or Yeti-or requested a review from qfox March 12, 2018 12:20
@@ -58,6 +58,7 @@ function parse(importString, ctx) {
if(!main.block) {
main.block = ctx.block;
main.elem || ctx.elem && (main.elem = ctx.elem);
acc.add(main);
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to fix jsdoc "[ctx] - entity to restore block part" > "[ctx] - entity to restore block/elem parts"

Copy link
Member

@qfox qfox Mar 15, 2018

Choose a reason for hiding this comment

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

We call it scope in the rest modules. Probably better to rename it here too.
block/elem is the base entity name (not part). But can be used in "part of import string" meaning.

@@ -63,14 +63,11 @@ Context allows to extract portion of entities.
```js
var enties = parse('m:theme=normal', { block: 'button' });

// → [ { block: 'button', mod: { name: 'theme' } },
// → [ { block: 'button' },
Copy link
Collaborator

@Vittly Vittly Mar 12, 2018

Choose a reason for hiding this comment

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

can we enclose ctx in [] in table above like [ctx] ? To mark it optional

@Vittly
Copy link
Collaborator

Vittly commented Mar 12, 2018

🆗

Previous decision was wrong we actually need to extract main entity
Check this issue: bem/webpack-bem-loader#64
Natural dependencies were broken
@Yeti-or Yeti-or force-pushed the yeti-or.natural-deps branch from f2eaa92 to ade638f Compare March 28, 2018 11:02
@Yeti-or Yeti-or force-pushed the yeti-or.natural-deps branch from ade638f to fc3d418 Compare March 28, 2018 11:13
@Yeti-or Yeti-or merged commit 525412d into master Mar 28, 2018
@Yeti-or Yeti-or deleted the yeti-or.natural-deps branch March 28, 2018 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants