gulp-htmlmin处理空格简直奇葩
This commit is contained in:
parent
4f5f3c2b2d
commit
44e79f3b55
@ -34,7 +34,7 @@ gulp.task('compressHtml', () => {
|
||||
}
|
||||
const minOption = {
|
||||
collapseWhitespace: true, //删除html中的空白
|
||||
conservativeCollapse: true, //将多个空白折叠为1空白(永远不要完全移除), 必须与 collapseWhitespace=true 一起使用
|
||||
conservativeCollapse: false, //将多个空白折叠为1空白(永远不要完全移除), 必须与 collapseWhitespace=true 一起使用
|
||||
collapseBooleanAttributes: true, //省略布尔属性的值 <input checked="true"/> ==> <input />
|
||||
removeEmptyAttributes: true, //删除所有空属性值 <input id="" /> ==> <input />
|
||||
removeScriptTypeAttributes: true, //删除<script>的type="text/javascript"
|
||||
|
||||
@ -3,14 +3,16 @@
|
||||
<% if (post.prev){ %>
|
||||
<a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
|
||||
<div class="article-nav-title">
|
||||
<i class="icon icon-arrow-circle-o-left"></i> <%= post.prev.title %>
|
||||
<i class="icon icon-arrow-circle-o-left"></i>
|
||||
<%= post.prev.title %>
|
||||
</div>
|
||||
</a>
|
||||
<% } %>
|
||||
<% if (post.next){ %>
|
||||
<a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
|
||||
<div class="article-nav-title">
|
||||
<%= post.next.title %> <i class="icon icon-arrow-circle-o-right"></i>
|
||||
<%= post.next.title %>
|
||||
<i class="icon icon-arrow-circle-o-right"></i>
|
||||
</div>
|
||||
</a>
|
||||
<% } %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user