grunt-inline
grunt-inline copied to clipboard
修复一个正则匹配错误
trafficstars
如下 html 代码
<script>console.log('yo')</script><script src="js/export.js?__inline=true"></script>
原有的正则表达式会匹配整行,而导致第一个 script 标签被错误地删除。
现在使用[^>]+?代替.+?保证只匹配>符号之前的内容。
@chyingp 求解决,因为我是先压缩 html 文件,再进行 grunt-inline 的。 这样会导致很多