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

@bem/sdk.naming.cell.match: Некорректно обрабатывает файлы с react неймингом #385

Open
yarastqt opened this issue Mar 11, 2019 · 3 comments
Labels

Comments

@yarastqt
Copy link
Member

Если в названии платформы или модификатора содержится знак минуса, то match выдает null:

const reactNaming = require('@bem/sdk.naming.presets/react')
const createMatch = require('@bem/sdk.naming.cell.match')

const match = createMatch(reactNaming)
const { cell } = match('MyBlock/_kind/MyBlock_kind@touch-phone.js') // => null
const { cell } = match('MyBlock/_kind/MyBlock_kind-name.js') // => null
@yarastqt
Copy link
Member Author

Решение докинуть сюда знак минуса помогло, но тогда элементы перестают парситься.

@yarastqt
Copy link
Member Author

cc @zxqfox

@qfox
Copy link
Member

qfox commented Mar 12, 2019

Кажется, что проблема в том как используется wordPattern
Надо покурить в код немного

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants