Skip to content

Incorrect precedence for regex and comment highlighting #41

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

  1. mngyuan commented on Jul 29, 2014

    @mngyuan
    Author

    default vim syntax highlighting also gets this behavior wrong

  2. 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

      Issue actions