Skip to content

Entire function is scoped as .token.function.meta.js #208

@Tyriar

Description

@Tyriar

For this function:

// An exceptionally useful comment
function func(param) {
    var text = 'string';
    for (var i = 0; i < param.length; i++) {
        text += i;
    }
    return {
        "text": text,
        "boolean": false
    };
}

The entire function contents is scoped with .token.function.meta.js, meaning if a style exists for this, which it does for several themes, this is what they do:

Microsoft Predawn theme
image

I believe this is the reason some people have pointed out about broken JavaScript text highlighting. Switching to the Atom JavaScript grammar removed the issue as the entire function block is not scoped as such.

/cc @aeschli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions