-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
packages/import-notation/index.js
Outdated
@@ -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); |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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' }, |
There was a problem hiding this comment.
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
🆗 |
Previous decision was wrong we actually need to extract main entity Check this issue: bem/webpack-bem-loader#64 Natural dependencies were broken
f2eaa92
to
ade638f
Compare
ade638f
to
fc3d418
Compare
Previous decision was wrong we actually need to extract main entity
Check this issue: bem/webpack-bem-loader#64
Natural dependencies were broken