grunt-inline icon indicating copy to clipboard operation
grunt-inline copied to clipboard

修复一个正则匹配错误

Open ValorLin opened this issue 11 years ago • 1 comments
trafficstars

如下 html 代码

<script>console.log('yo')</script><script src="js/export.js?__inline=true"></script>

原有的正则表达式会匹配整行,而导致第一个 script 标签被错误地删除。 现在使用[^>]+?代替.+?保证只匹配>符号之前的内容。

ValorLin avatar Oct 16 '14 07:10 ValorLin

@chyingp 求解决,因为我是先压缩 html 文件,再进行 grunt-inline 的。 这样会导致很多

ValorLin avatar Mar 03 '15 08:03 ValorLin