[英]sublimetext3 - broken js syntax in php file
Sublime Text - Version 3.0, Build 3143 Sublime Text-版本3.0,内部版本3143
I deal with a lot of php files that contain HTML, CSS and JavaScript. 我处理了很多包含HTML,CSS和JavaScript的php文件。 The only problem I've found so far is when I'm looking at script tags in a PHP file.
到目前为止,我发现的唯一问题是查看PHP文件中的脚本标签时。 The syntax is set to PHP but comments outside of JS functions break the rest of the code below it (it looks like it's trying to detect regex?)
语法设置为PHP,但是JS函数之外的注释破坏了它下面的其余代码(看起来像是在尝试检测正则表达式?)
When I move the // test
comment into the function then all is well: 当我将
// test
注释移到函数中时,一切都很好:
I'm curious to know where the problem exists and maybe find a fix. 我很好奇要知道问题出在哪里,也许能找到解决办法。
type="text/javascript"
to the script tag doesn't fix anything type="text/javascript"
到脚本标签无法解决任何问题 My finger points to the PHP syntax highlighting ... but if that's the case, how can this be fixed? 我的手指指向了PHP语法高亮显示...但是如果是这种情况,如何解决?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.