bem / html-differ

Сompares two HTML
http://bem.info/tools/testing/html-differ/
MIT License
212 stars 45 forks source link

Add ignoring of duplicate 'css' classes #140

Closed eGavr closed 8 years ago

eGavr commented 8 years ago

closes #138

/cc @zxqfox

qfox commented 8 years ago

:shipit: Thanks!

qfox commented 8 years ago

@tadatuta Can you please look at this PR and tell us your wise opinion about duplications in classes? Can it be important for someone? Should there be an option to compare class attributes more accurately?

tadatuta commented 8 years ago

@zxqfox I understand that duplicate classes do no harm but why should we consider HTML with them identical? Isn't duplication a result of some issues with templates?

qfox commented 8 years ago

@tadatuta I described my position in #138. <input class="a a a"> and <input class="a"> are the same for browser, so there is no real difference, gzip will help you if your template contains repeats. Moreover, if somebody need it for real cases, we can add an option to check for duplications. Atm we can't disable this check (as well as sorting classes, and a lot of other assumptions).

tadatuta commented 8 years ago

there is no real difference

as I wrote above I know there's no difference for browsers but it may be for template engines or templates.

if somebody need it for real cases

can't imagine any ;)

qfox commented 8 years ago

:yellow_heart: :heart: :yellow_heart: Thanks!