Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with backslash-escaped string in a place where a string is not expected #134

Closed
srawlins opened this issue May 12, 2017 · 0 comments
Closed
Labels

Comments

@srawlins
Copy link
Contributor

srawlins commented May 12, 2017

Take this SCSS:

a {
  @extend '\A';
}

Ruby sass errors properly:

Error: Invalid CSS after "": expected selector, was "'\A'"
        on line 2 of d.scss

Dart sass crashes less gracefully:

Unexpected exception:
NoSuchMethodError: The method '>=' was called on null.
Receiver: null
Tried calling: >=(97)

dart:core                                                  Object.noSuchMethod
package:sass/src/util/character.dart 45:16                 isHex
package:sass/src/ast/sass/expression/string.dart 69:39     StringExpression.asInterpolation
package:sass/src/parse/stylesheet.dart 2145:56             StylesheetParser._almostAnyValue
package:sass/src/parse/stylesheet.dart 545:17              StylesheetParser._extendRule
package:sass/src/parse/stylesheet.dart 369:16              StylesheetParser._atRule
package:sass/src/parse/stylesheet.dart 87:16               StylesheetParser._statement
package:sass/src/parse/scss.dart 83:29                     ScssParser.children
package:sass/src/parse/stylesheet.dart 143:25              StylesheetParser._styleRule
package:sass/src/parse/stylesheet.dart 103:23              StylesheetParser._statement
package:sass/src/parse/stylesheet.dart 65:46               StylesheetParser.parse.<fn>.<fn>
package:sass/src/parse/scss.dart 121:32                    ScssParser.statements
package:sass/src/parse/stylesheet.dart 65:29               StylesheetParser.parse.<fn>
package:sass/src/parse/parser.dart 541:22                  Parser.wrapSpanFormatException
package:sass/src/parse/stylesheet.dart 63:12               StylesheetParser.parse
package:sass/src/ast/sass/statement/stylesheet.dart 40:56  Stylesheet.Stylesheet.parseScss
package:sass/sass.dart 31:13                               render
package:sass/src/executable.dart 50:15                     main
@srawlins srawlins changed the title Process hangs with bad @extend line Crash with backslash-escaped string in a place where a string is not expected May 12, 2017
@nex3 nex3 added the bug label May 18, 2017
@nex3 nex3 closed this as completed in 372ef02 May 20, 2017
nex3 added a commit that referenced this issue May 10, 2023
Run sass-spec tests against the latest Dart Sass by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants