Skip to content

Highlighting breaks on standard JS with flow_types: true #131

@mischnic

Description

@mischnic

Sublime Text build number

4121

Example Code

$bar$export$2e2bcd8739ae039({
    displayable: function () {
        return (
            -0.5 <= this.r &&
            this.r < 255.5 &&
            -0.5 <= this.g &&
            this.g < 255.5 &&
            -0.5 <= this.b &&
            this.b < 255.5 &&
            0 <= this.opacity &&
            this.opacity <= 1
        );
    },
    toString: $foo$var$rgb_formatRgb,
});
function $foo$var$rgb_formatHex() {
    return (
        "#" + $foo$var$hex(this.r) + $foo$var$hex(this.g) + $foo$var$hex(this.b)
    );
}

JS Custom Preferences

{
    "configurations": {
        "Default": {}
	},
	"defaults": {
		"file_extensions": ["js", "jsx"],
		"flow_types": true,
		"jsx": true
	}
}

Configuration name

JS Custom - Default

Description

The highlighting breaks in the middle of the file (note that there is no JSX or Flow syntax in this case):

Bildschirmfoto 2021-11-10 um 10 09 25

Everything works correctly when setting "flow_types": false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions