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

标签筛选过程中漏检了伪类(pseudo-class) #2

Open
budblack opened this issue Jan 10, 2018 · 2 comments
Open

标签筛选过程中漏检了伪类(pseudo-class) #2

budblack opened this issue Jan 10, 2018 · 2 comments

Comments

@budblack
Copy link

./lib/proccessSelector.js 中 hasPseudoEle 变量仅指代了伪元素(pseudo-element)存在的情况, 另需一个hasPseudoCls用来筛选伪类(pesudo-class) 或者直接在判断里加一个或条件

// 判断是否为 伪元素/伪类 节点
     hasPseudoEle = (
                        item.type === 'pseudo-element' ||
                        item.type === 'pseudo-class'
                    ) ? true : hasPseudoEle;

否则无法正确识别处理 :before 等标记.

@budblack
Copy link
Author

似乎我我自己的问题, 我这边将css中 :: 写作了 : 导致一系列异常. 细节上我再详细推敲一下. 抱歉

@xuxusheng
Copy link
Owner

xuxusheng commented Jan 10, 2018

@budblack

https://github.com/xuxusheng/html-attr-scope-loader#%E5%9B%9B%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9

参考注意事项中的第5条,有说明这一点哦~

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

No branches or pull requests

2 participants