dart-lang / csslib

A library for parsing CSS.
https://pub.dev/packages/csslib
BSD 3-Clause "New" or "Revised" License
95 stars 38 forks source link

Update processFont to handle null expressions. #186

Closed ykmnkmi closed 7 months ago

ykmnkmi commented 1 year ago

CSS

.foo {
  color:;
}
.bar {
  font:;
  color: blue;
}

StackTrace:

Null check operator used on a null value
package:csslib/parser.dart 2855:23               ExpressionsProcessor.processFont
package:csslib/parser.dart 1912:43               _Parser.buildDartStyleNode
package:csslib/parser.dart 1884:14               _Parser._styleForDart
package:csslib/parser.dart 1762:27               _Parser.processDeclaration
package:csslib/parser.dart 1178:18               _Parser.processDeclarations
package:csslib/parser.dart 1095:37               _Parser.processRule
package:csslib/parser.dart 205:20                _Parser.parse
package:csslib/parser.dart 65:36                 compile
devoncarew commented 1 year ago

Thanks for the contribution! As per our contribution guidelines (https://github.com/dart-lang/.github/blob/main/PULL_REQUEST_TEMPLATE.md?plain=1), can you:

Thanks!