Closed shazow closed 13 years ago
Example, from the HTML5 boilerplate:
<!doctype html> <!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> <!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> <!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head>
When I re-indent it with gg=G, it ends up looking like this:
This makes logical sense (since technically <html> is declared 4 times), but is not ideal. I propose a flag to ignore indents on lines starting with a comment (or bonus points if it's specific to conditional comments).
<html>
We didn't parse the html document. So this is not easy to fix. I will keep this issue open until I get good solution to fix this.
Use a simple fix only for html and body tag
Example, from the HTML5 boilerplate:
When I re-indent it with gg=G, it ends up looking like this:
This makes logical sense (since technically
<html>
is declared 4 times), but is not ideal. I propose a flag to ignore indents on lines starting with a comment (or bonus points if it's specific to conditional comments).