-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
space-tab-mix-disabled #119
Comments
Currently, "space-tab-mixed-disabled" rule in HTMLHint checks space/tab inside each DOM node, that's why the space after span tag will result in warning, when this rule value is "tab". It seems this rule would be more reasonable if it only checks space/tab at the beginning of each line to alert bad indentation styles, and leave space/tab inside DOM element alone. Need @yaniswang to confirm this behaviour change. I tried to fix this issue by fire new event when line break is found, but this may violate some current design. |
In my case I'm solving this changing line 19 of space-tab-mixed-disabled.js with this: else if (options === 'tab' && /^\t+$/.test(match[2]) === false && match.input.indexOf('\n') !== -1) { If there isn't a new line in the original string that I'm matching, then I ignore the error |
@molant, this is a quick fix and it solves the problem. However, the performance can be improved as space-tab-mixed-disabled rule does not need to be invoked if there is no line break. I'll submit a pull request later, fixing this issue by fire&listen line-break event. |
"space-tab-mixed-disabled": "tab"
I have space after
<span>
inside<p>
and htmlhint throws it as an warning. It's really annoying issueThe text was updated successfully, but these errors were encountered: