desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #34495
[Bug 682441] Re: the sequence "/>" in a string breaks javascript syntax highlighting within HTML
[Expired for gtksourceview2 (Ubuntu) because there has been no activity
for 60 days.]
** Changed in: gtksourceview2 (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gtksourceview2 in Ubuntu.
https://bugs.launchpad.net/bugs/682441
Title:
the sequence "/>" in a string breaks javascript syntax highlighting
within HTML
Status in “gtksourceview2” package in Ubuntu:
Expired
Bug description:
Binary package hint: gedit
Try pasting this code into an html file and open it in gedit:
---------sample text that breaks syntax highlight---------
<html>
<script type="text/javascript">
//<![CDATA[
var f="/>"; //this breaks syntax highlight
for (var i=0;i<10;i++) {} //just some more code with fucked up
highlight
//]]>
</script>
</html>
--------end of sample text-----
Expected result: the "/>" characters shouldn't break syntax highlight,
since they are within a string, so it is valid javascript, and the
javascript code is within a CDATA, so it is all valid HTML.
Observed result: syntax highlights are messed up starting from the
"/>" character string.
Incidentally, note that this seems to be a problem with javascript syntax, or the way javascript interacts with html. It is not just a problem with HTML. I say this because the following example is highlighted properly and does not break gedit's html highlighting:
---- sample text that works fine ------
<html>
<div>
<![CDATA[
/>
/>/>/>/>/> "/>"
]]>
</div>
</html>
---- end of sample text ----
Also, the javascript code in the first example works fine when it is pasted in a javascript-only file without html.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gtksourceview2/+bug/682441/+subscriptions