Syntax highlighting breaks with two single quotes
Thank you for your super handy extension! I think I found a bug. Copy/paste the following code into VisualStudio:
<body>
<div>
<div id="error"></div>
<input id="text">
<button id="btnsubmit"
_="on click if #text.value == '' then put 'Type somenthing' into #error wait 2s then put '' into #error">
Button
</button>
</div>
</body>
You will notice that from the string Button downwards the syntax highlighting breaks. This is due to the two single quotes '' at the end of the hyperscript string.
If you add a space between the two quotes ' ' the syntax highlighting if recovered. Without the space syntax highlighting breaks.
This happens only with the last pair of quotes in the hyperscript string. If you add a space between the first quotes (near the ==) the behaviour does'nt change.
I've managed to identify the cause of this problem. The solution will take a while however.
Would be nice to have this fixed, as everything bellow this is just 'yellow' in my case :p
Having the same issue here, @dz4k what would the fix entail?
Having the same issue here, @dz4k what would the fix entail?
As a temporary fix, it might work to put end at the end of the line. (Not tested myself)
E.g. init call ... end
For the code in question I changed to single quotes for _='...' and double quotes inside and it works.