Skip to content

url() highlighting sometimes incorrect #47

@TamsynUlthara

Description

@TamsynUlthara

The highlighting for url() seems incorrect in a strange mix of circumstances:

  • The line with url() is indented with tabs, not spaces.
  • url()'s argument uses quotes (which is sometimes necessary in Stylus, e.g., for embedded images).
  • url()'s argument has a character followed by an equal sign (=), such as you might see in a Base64 data URI. Not all prefix characters trigger this, but alphanumerics do.

For example, this triggers the incorrect highlighting in vim-stylus (assuming tabs for indentation):

div
    background: url("a=")

It looks like that combination triggers the assignment syntax rules, and interprets the closing quote in url("a=") as the opening quote of a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions