Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting breaks with two single quotes #2

Open
Nicero opened this issue Apr 8, 2022 · 5 comments
Open

Syntax highlighting breaks with two single quotes #2

Nicero opened this issue Apr 8, 2022 · 5 comments

Comments

@Nicero
Copy link

Nicero commented Apr 8, 2022

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.

@dz4k
Copy link
Owner

dz4k commented Jun 13, 2022

I've managed to identify the cause of this problem. The solution will take a while however.

@leandergangso
Copy link

Would be nice to have this fixed, as everything bellow this is just 'yellow' in my case :p

@danawoodman
Copy link

Having the same issue here, @dz4k what would the fix entail?

Screenshot 2023-10-22 at 3 46 10 PM

@leandergangso
Copy link

Having the same issue here, @dz4k what would the fix entail?

Screenshot 2023-10-22 at 3 46 10 PM

As a temporary fix, it might work to put end at the end of the line. (Not tested myself)

E.g. init call ... end

@danawoodman
Copy link

For the code in question I changed to single quotes for _='...' and double quotes inside and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants