-
Notifications
You must be signed in to change notification settings - Fork 628
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 #245 #253
fix #245 #253
Conversation
throw new Error(); | ||
} | ||
} | ||
); | ||
debug(html); | ||
assert.equal( | ||
html, | ||
'href="#" attr1="b" attr2="c" attr3 attr4="value4"e;" attr5' | ||
'href="#" attr1="b" attr2="c" attr3 attr4="value4"e;" attr5 attr6\\ attr7="123 456"' |
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.
这里结果不太符合预期,attr6\\
应该为 attr6\\"
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.
这是因为正则var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim
会对属性字符串过滤,双引号不在有效的属性符号内,所以被过滤掉了,这个PR理论上不涉及这个正则的逻辑更改
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.
如果你需要把双引号认为是合法的属性字符的话,我可以继续更改这个PR
5f0eaf8
to
4ccbd0e
Compare
fix #245
Case A
<span class=\"preference__text--green text--bold\">BP</span>
class
andtext--bold
class
andtext--bold\
Case B
<span class= "preference__text--green text--bold">BP</span>
class
andtext--bold
class