Skip to content

Incorrect precedence for regex and comment highlighting #41

Open
@mngyuan

Description

@mngyuan

If a line contains a slash and a comment, the plugin highlights the text from the slash to the comment as a regex, then fails to highlight the comment.

var result = 1 / 2; // this is a comment, but it won't be highlighted
var block = 2 / 3; /* this also will consider /3;/ as a regex */

Activity

mngyuan

mngyuan commented on Jul 29, 2014

@mngyuan
Author

default vim syntax highlighting also gets this behavior wrong

jelera

jelera commented on Aug 1, 2014

@jelera
Owner

Yes, I see it too. The regex to match the JavaScript regexes is quite complex. I'll suggest to stick with // as your line comments for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jelera@mngyuan

        Issue actions

          Incorrect precedence for regex and comment highlighting · Issue #41 · jelera/vim-javascript-syntax