-
-
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
Incorrect "tag must be paired" message #23
Comments
You can config the htmlhint to disable tag-pair. https://github.com/yaniswang/HTMLHint/wiki/Usage |
tag-pair verification is VERY useful; I do not want to disable it. But the "source" tag, within a pair of "audio" tags, does not need to have a closing tag. Hence, HTMLhint gives a wrong message when the "source" tag is used. |
I have no solution for this. HTMLHint only can scan html code. Do you have some good idea for this? |
Yes, htmlhint does not flag image or br tags that are not closed, as they do not need to be closed. The source tag should be treated the same way. |
I just test your code with: http://htmlhint.com/
Only report a Doctype error message. |
Please remplace the square brackets [ by proper angle brackets
to see the error. I had used square brackets because I did not realize I needed to indent the code to have angle brackets displayed properly before (and the sample code with angle brackets was not showing). |
I'm sorry, my english is pool, i can't understand. |
No need to apologize. When I reported the bug, I did not understand the commenting system on github. The html source tag https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source does not need to be closed. Yet, htmlhint identifies this as an error. |
Ok, I know. |
Ok, thank you very much! :-) |
@aroberge Point is that you still should use self closing tags: |
Oh come on @franz-josef-kaiser - it's 2014, no one uses xhtml and even old IEs understand unclosed tags. @yaniswang it would be nice if HTMLHint could ignore a part of html code, something like this:
that's useful because sometimes we use php with html together and of course sometimes php tags drive HTMLHint crazy |
@franz-josef-kaiser Given that the non self-closing tag I was using was an HTML5 specific tag, a comment about browsers not supporting this is completely missing the point. |
@aroberge And how would the Linter know that you are using a HTML5 tag? (rhetorical question) |
@franz-josef-kaiser Simply adding an option to ignore specific tags by recognizing a specially formed comment like I mentioned when I entered this issue or similarly introduced by @darkwebdev would be all that is needed: this would be future proof for any new html tag. |
HTMLHint is a html Linter, so i suggest not support other script language, such as:PHP,java,.net,Ruby... |
@yaniswang Yes, but in lots of cases you have templates containing code that converts on runtime. PHP is a templating language and such content can't get converted up front as it's coming from a database.. |
We test the html code on test env in my company. |
Hi! Why I get error message from this code?
|
HtmlHint only support html code, no support template. |
No! Everything ok! I got error because of |
Add HTML5 elements to map of empty tags #23
@aroberge hey bro, you might have missed the div or any other pair , thats the problem , just now i solved on my own 👍 |
@yaniswang please reopen the issue I get this error on standard HTML5 <label for="myBrowser">Choose a browser from this list:</label>
<input list="browsers" id="myBrowser" name="myBrowser" />
<datalist id="browsers">
<option value="Chrome">
<option value="Firefox">
<option value="Internet Explorer">
<option value="Opera">
<option value="Safari">
<option value="Microsoft Edge">
</datalist> |
I'm working a lot with TYPO3 and some of it's viewhelpers chain arguments separated by dots in the tag name. This will throw an error: <f:link.page>
some text
</f:link.page> It would be nice if HtmlHint would let the I would change the rule and load it as a custom one, but I'm not sure how I can make it ignore the dot. |
I'm using htmlhint as an extension of the Brackets editor.
In a file, I have an audio tag with a source tag:
[audio id="take-sound" preload]
[source src="src/sounds/pick.wav" type="audio/x-wav"]
[/audio]
I get a "tag must be paired message". In html5, the source tag does not require a closing tag.
It would be useful if htmlhint would allow the insertion of comments within html5 to disable errors, something like
[!-- htmlhint ignore:line --]
EDIT: have replace angle brackets by square brackets, otherwise the entire content inside them disappeared.
The text was updated successfully, but these errors were encountered: