Community
Participate
Working Groups
Fix for this bug is also needed in 3.2.3 and 3.3 +++ This bug was initially created as a clone of Bug #326303 +++ Currently the JSDT validator does not support text after a leading opening HTML style comment in a JavaScript region. This scenario is stated as valid in http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.3 Example: <script type="text/javascript"> <!-- to hide script contents from old browsers var v = "foo"; // --> </script>
Created attachment 179747 [details] Fix Patch with JUnits This fix takes care of fixing the JsTranslator and FormattingStrategyJSDT. This in turn fixes the invalid validation message and deals with formatting this situation. What is not fixed by this is syntax highlighting. The text following the leading HTML comment will still show styled as JS content and not as a JS comment. A separate bug will be opened to fix that. The patch also adds 6 new JUnits and updates one existing JUnit. 5 of the new junits are for formatting, 1 is for translation, and the updated JUnit is also in translation.
The patch for Bug 313624 has been updated to deal with the syntax highlighting issues that come along with this problem.
Patch checked into 3.2.3 and HEAD.