max7
max7

Reputation: 798

Aptana Warns about script and link tags when it shouldn't

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:

    <!-- 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.

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?

Upvotes: 12

Views: 8305

Answers (5)

Musa
Musa

Reputation: 97672

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

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.

Upvotes: 3

A. L. Flanagan
A. L. Flanagan

Reputation: 1168

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.

Upvotes: 1

Matthew Nakayama
Matthew Nakayama

Reputation: 325

Go to Window > Preferences > Aptana Studio > Validation > 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.

Upvotes: 18

Russdogg
Russdogg

Reputation: 73

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>

Upvotes: 6

Christian Gann
Christian Gann

Reputation: 156

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>

Upvotes: 7

Related Questions