Aptana在不应该的时候警告脚本和链接标签

时间:2021-06-17 06:54:40

I'm running Aptana Studio 3, build: 3.1.3.201205292243, Win7 64bit, and I've noticed that after the last update, Aptana is warning me (annotations on the vertical) that I should "trim empty " tags, but these are normal script tags linking an external js file like this:

我运行的是Aptana Studio 3, build: 3.1.3.201205292243, Win7 64bit,我注意到在上次更新之后,Aptana警告我(在垂直方向上的注释)我应该“修饰空”标记,但这些是连接外部js文件的普通脚本标记:

    <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->

    <link rel="shortcut icon" href="/favicon.ico" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="js/jquery.lightbox-0.5.js"></script>
    <script src="js/flickrapi3.js"></script>
    <link rel="stylesheet" href="css/jquery.lightbox-0.5.css" />
    <link rel="stylesheet" href="css/flickrStyle.css" />

Furthermore, it also warns me about the rel attribute inside the link tag as having an "invalid value" and yet these are the defaults included in the HTML5 template Aptana bundles with the release.

此外,它还警告我,链接标签内的rel属性有一个“无效值”,但这些都是HTML5模板Aptana包中包含的默认值。

I've checked in Preferences>Editors>Text Editors and I see annotation settings but I don't see where I can correct these completely off the wall warnings. Am I missing something entirely here? Are these known bugs? How do I correct these issue?

我在Preferences>编辑器>文本编辑器中进行了检查,我看到了注释设置,但是我不知道在哪里可以完全消除这些警告。我是不是完全漏掉了什么?这些已知的错误吗?我如何改正这些问题?

5 个解决方案

#1


6  

It's just a trick, and make the </script> in a new line, the warning will disappear, like this below:

这只是一个技巧,将放在新行中,警告将会消失,如下所示:

<script src="js/jquery.lightbox-0.5.js">
</script>

#2


18  

Go to Window > Preferences > Aptana Studio > Validation > HTML.

到窗口>偏好> Aptana Studio >验证> HTML。

Change the two checks by "HTML Tidy Validator" into "X". Alternatively, you could click "+" to add a regular expression to filter out the error.

通过“HTML Tidy Validator”将这两个检查更改为“X”。或者,您可以单击“+”添加正则表达式以过滤掉错误。

#3


6  

Another even simpler workaround to hide the warning is to just put a space in between the tags.

隐藏警告的另一个更简单的方法是在标记之间放一个空格。

<script src="js/jquery.lightbox-0.5.js"> </script>

#4


3  

If you find it annoying having the warning for more than just script tags you can disable it all tags

如果您发现除了脚本标签之外还有其他的警告,您可以禁用所有的标签

Go to Window > Preferences > Aptana Studio > Validation

转到窗口>首选项> Aptana Studio >验证

Select HTML Tidy Validator then some collapse-able options will appear. Select Elements, it will show a list of option. Now go to the bottom of the list and you'll see Trim empty elements Change it from warning to ignore.

选择HTML Tidy Validator,会出现一些可折叠的选项。选择元素,它将显示一个选项列表。现在进入列表的底部,您将看到修剪的空元素从警告变为忽略。

#5


1  

This should be fixed in version 3.2.0.201206061952: https://jira.appcelerator.org/browse/APSTUD-4724 So you can pull a nightly build or just wait for them to promote it to release.

这应该在3.2.2.0.201206061952版本中得到修正:https://jira.appcelerator.org/browse/APSTUD-4724,这样您就可以每隔一段时间进行构建,或者只是等待他们将其提升到发布版本。

#1


6  

It's just a trick, and make the </script> in a new line, the warning will disappear, like this below:

这只是一个技巧,将放在新行中,警告将会消失,如下所示:

<script src="js/jquery.lightbox-0.5.js">
</script>

#2


18  

Go to Window > Preferences > Aptana Studio > Validation > HTML.

到窗口>偏好> Aptana Studio >验证> HTML。

Change the two checks by "HTML Tidy Validator" into "X". Alternatively, you could click "+" to add a regular expression to filter out the error.

通过“HTML Tidy Validator”将这两个检查更改为“X”。或者,您可以单击“+”添加正则表达式以过滤掉错误。

#3


6  

Another even simpler workaround to hide the warning is to just put a space in between the tags.

隐藏警告的另一个更简单的方法是在标记之间放一个空格。

<script src="js/jquery.lightbox-0.5.js"> </script>

#4


3  

If you find it annoying having the warning for more than just script tags you can disable it all tags

如果您发现除了脚本标签之外还有其他的警告,您可以禁用所有的标签

Go to Window > Preferences > Aptana Studio > Validation

转到窗口>首选项> Aptana Studio >验证

Select HTML Tidy Validator then some collapse-able options will appear. Select Elements, it will show a list of option. Now go to the bottom of the list and you'll see Trim empty elements Change it from warning to ignore.

选择HTML Tidy Validator,会出现一些可折叠的选项。选择元素,它将显示一个选项列表。现在进入列表的底部,您将看到修剪的空元素从警告变为忽略。

#5


1  

This should be fixed in version 3.2.0.201206061952: https://jira.appcelerator.org/browse/APSTUD-4724 So you can pull a nightly build or just wait for them to promote it to release.

这应该在3.2.2.0.201206061952版本中得到修正:https://jira.appcelerator.org/browse/APSTUD-4724,这样您就可以每隔一段时间进行构建,或者只是等待他们将其提升到发布版本。