lesscss javascript 编译器中的死代码

发布于 2024-12-15 03:46:49 字数 162 浏览 6 评论 0原文

看起来 lesscss javascript 编译器代码中有一堆死代码(被注释掉的代码)。这是有原因的吗?直接从 网站 下载时,文件大小为 34kb,删除死代码后,文件大小为 5.78kb(版权注释中留下) )。

it looks like there is a bunch of dead code (code that is commented out) in the lesscss javascript compiler code. Is there a reason for this? When downloading right from the website the file is 34kb, after removing the dead code it is 5.78kb (left in the copyright comments).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

神魇的王 2024-12-22 03:46:49

当我将 LESS JavaScript 代码扔到压缩器时,很少有任何代码消失。

当我在编辑器 (Kate) 中查看代码时,语法突出显示将大部分代码标记为注释,从以下位置开始:

(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.last
                                         ^^ From here on

此错误可能是由字符串的大小引起的(34KB at one线)。当我在 +"//".... 之前添加换行符时,语法突出显示按预期工作。

When I throw the LESS JavaScript code at a compressor, rarely any code disappears.

When I view the code in my editor (Kate), the Syntax highlighting marks a large part of the code as comments, starting from:

(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.last
                                         ^^ From here on

This error is probably caused by the size of the string (34KB at one line). When I add a linebreak before +"//"...., the syntax highlighting works as intended.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文