Skip to content

vsc collapse/folding gets confused if < is used in condition #2537

@Ray57

Description

@Ray57

Describe the bug

If "less than" is used in a svelte conditional statement and the block contains a wrapping

, vsc does not display the "v" to allow collapse of the block. Use of anything else works. E.G. {#if step > 1} {#if step == 1}

Reproduction

{#if step < 1}
    <div>
        Not collapsible (Neither <!-- {#if} nor <div> -->)
    </div>
{/if}

Expected behaviour

{#if step < 1}
    Collapsible (No <div> present)
{/if}

{#if step > 1}
    <div>
        Collapsible (Both <!-- {#if} and <div> -->)
    </div>
{/if}

System Info

Windows
VSCode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

Issue - Collapse

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions