Parser: HTML or JS? I'm not sure at which level this should be fixed.
CTags version: master (b11e39a)
If JS embedded in HTML starts with <!--, the next symbol won't be properly recognized. For example:
$ cat /tmp/a.html
<!DOCTYPE html>
<head>
<script type="text/javascript">
<!--
function message() { alert( "Hello."); }
//-->
</script>
</head>
</html>
$ ./ctags -o- --extras=+g /tmp/a.html
$ sed 's,^<!--,//&,' < /tmp/a.html > /tmp/b.html
$ cat /tmp/b.html
<!DOCTYPE html>
<head>
<script type="text/javascript">
//<!--
function message() { alert( "Hello."); }
//-->
</script>
</head>
</html>
$ ./ctags -o- --extras=+g /tmp/b.html
message /tmp/b.html /^function message() { alert( "Hello."); }$/;" f
This used to work before the JSX support (6c6799a).
I'm not quite sure whether the first (non-working) example works in a web browser because ECMAScript supports this special case, or if it's the browser doing this (so whether it should be on the JS or HTML side), but they seem to be happy with it, so we probably should be as well. This breaks Geany's simple.html test case (although it supposedly came from here, I couldn't find it in the history).
Parser: HTML or JS? I'm not sure at which level this should be fixed.
CTags version: master (b11e39a)
If JS embedded in HTML starts with
<!--, the next symbol won't be properly recognized. For example:This used to work before the JSX support (6c6799a).
I'm not quite sure whether the first (non-working) example works in a web browser because ECMAScript supports this special case, or if it's the browser doing this (so whether it should be on the JS or HTML side), but they seem to be happy with it, so we probably should be as well. This breaks Geany's simple.html test case (although it supposedly came from here, I couldn't find it in the history).