CSS3 icon indicating copy to clipboard operation
CSS3 copied to clipboard

Bug: Highlighting breaks after nesting more than 2 levels of parentheses

Open ryami333 opened this issue 11 months ago • 0 comments

The syntax highlighting breaks if any calculations are nested within more than 2 sets of parentheses. A minimal reproducible example can be produced like this:

.foo {
  --foo: calc(((1)));
}
Screenshot 2024-03-06 at 18 17 43

In case you'd like some more examples to add to unit tests, here are some real world cases that I've come across in my current project:

--breakpoint: calc(
var(--min-column-size) * var(--column-count) + (var(--gap) * (var(--column-count) - 1))
);
flex-basis: calc(((var(--_main-min-width) - (100% - var(--_sidebar-size) - var(--_gap))) * 9999));

ryami333 avatar Mar 06 '24 17:03 ryami333