-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add grunt-contrib-htmlmin. #15294
Add grunt-contrib-htmlmin. #15294
Conversation
4a45ee2
to
c5edadd
Compare
I need to check why validation fails later. |
-1 from me. Don't think it's worth risking the bugs that this might cause. |
Well, there shouldn't be any issues, because 1) I have enabled conservative whitespace removal and 2) the validator should catch any issues. The gain isn't small IMO; I'm not talking about the index page here ofc. |
There are differences that can come up from HTML formatting and white space—in particular with |
Like I said, I have enabled conservative whitespace; there shouldn't be any issue with Feel free to check out the branch; I'll have a look at the errors tomorrow or so. |
@@ -391,7 +411,7 @@ module.exports = function (grunt) { | |||
require('time-grunt')(grunt); | |||
|
|||
// Docs HTML validation task | |||
grunt.registerTask('validate-html', ['jekyll:docs', 'validation']); | |||
grunt.registerTask('validate-html', ['jekyll:docs', 'htmlmin', 'validation']); |
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.
I'm not sure about this; this means it will report much less helpful line numbers for the locations of errors.
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.
Ah, that's a very valid concern. I've run into these validation reports a lot as I write new docs sections.
One of the validation errors is: <p> <div class=highlight>(...stuff...)</div> <h3 id=js-noconflict>No conflict</h3> </p> Pretty sure the |
c5edadd
to
f906799
Compare
@XhmikosR Rebase? |
Sure thing. I'm just having some second thoughts regarding doing the
|
569757f
to
b4019d7
Compare
b4019d7
to
f522711
Compare
88e8382
to
109160e
Compare
@mdo @cvrebert: apparently, those validation errors we got in this branch were correct. I don't get how the validator didn't catch them in master... So, I think this branch is completely safe. I removed the task from the validation target. |
e6135ce
to
c44d99b
Compare
5f910bf
to
ceabed0
Compare
7c7ab37
to
d15ccc9
Compare
d15ccc9
to
442e9d7
Compare
What's the deal on white-space sensitive components then? How does |
@mdo #15294 (comment). |
442e9d7
to
3956157
Compare
Yeah, it keeps the whitespace so it's pretty much safe. |
3956157
to
61415d8
Compare
@cvrebert you are correct about paragraphs. W3C Validator returns: No p element in scope but a p end tag seen. for <p> <div class=highlight>(...stuff...)</div> <h3 id=js-noconflict>No conflict</h3> </p> |
Sorry I missed that the white-space stuff was all settled. Is there another bug in this to address still? |
61415d8
to
38eb53e
Compare
@mdo: it should be OK as far as I'm concerned. |
Cool, I'm okay to see this ship then if the white-space problem has been completely addressed. <3 |
38eb53e
to
330f322
Compare
Only used for the GitHub docs.
330f322
to
e778dc1
Compare
Only used for the GitHub docs.
I skipped the examples on purpose since many people seem to copy paste those. Let me know your thoughts.