Skip to content

Bug: HSL highlighting doesn't work if the numbers have any decimals in them #99

@gabrielmfern

Description

@gabrielmfern

Describe the bug

HSL highlighting does not work if you have any decimals inside of any of the parameters to the function,
so If you try something like hsl(216deg, 87.5%, 45%) with hsl_fn enabled it doesn't work
but if you do remove the .5 it does.

To Reproduce

My configuration looks like:

{
  filetypes = { "*" },
  user_default_options = {
    mode = "background",
    rgb_fn = true,
    hsl_fn = true,
    tailwind = true
  },
}

Just add both the hsl function calls I mentioned before and see that one gets highlighted and the other
doesn't.

Expected behavior

That any kind of colors passed onto the hsl function get highlighted.

Neovim Version:
v0.10.0-dev-2397+ga9f578b7a

Colorizer Version:
I tried running the command but wasn't able to so just the commit hash is 85855b3 of the version
I am using. I think this is the latest one.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions