mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Properly parse escaped digits at the beginning of identifiers (#486)
See sass/sass#1542 Closes sass/dart-sass#485
This commit is contained in:
parent
b3c9e7b00f
commit
ff3cea5312
@ -1,5 +1,7 @@
|
|||||||
## 1.14.1
|
## 1.14.1
|
||||||
|
|
||||||
|
* Canonicalize escaped digits at the beginning of identifiers as hex escapes.
|
||||||
|
|
||||||
* Properly parse property declarations that are both *in* content blocks and
|
* Properly parse property declarations that are both *in* content blocks and
|
||||||
written *after* content blocks.
|
written *after* content blocks.
|
||||||
|
|
||||||
|
@ -395,7 +395,9 @@ abstract class Parser {
|
|||||||
|
|
||||||
if (identifierStart ? isNameStart(value) : isName(value)) {
|
if (identifierStart ? isNameStart(value) : isName(value)) {
|
||||||
return new String.fromCharCode(value);
|
return new String.fromCharCode(value);
|
||||||
} else if (value < 0x1F || value == 0x7F) {
|
} else if (value < 0x1F ||
|
||||||
|
value == 0x7F ||
|
||||||
|
(identifierStart && isDigit(value))) {
|
||||||
var buffer = new StringBuffer()..writeCharCode($backslash);
|
var buffer = new StringBuffer()..writeCharCode($backslash);
|
||||||
if (value > 0xF) buffer.writeCharCode(hexCharFor(value >> 4));
|
if (value > 0xF) buffer.writeCharCode(hexCharFor(value >> 4));
|
||||||
buffer.writeCharCode(hexCharFor(value & 0xF));
|
buffer.writeCharCode(hexCharFor(value & 0xF));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: sass
|
name: sass
|
||||||
version: 1.14.1-dev
|
version: 1.14.1
|
||||||
description: A Sass implementation in Dart.
|
description: A Sass implementation in Dart.
|
||||||
author: Dart Team <misc@dartlang.org>
|
author: Dart Team <misc@dartlang.org>
|
||||||
homepage: https://github.com/sass/dart-sass
|
homepage: https://github.com/sass/dart-sass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user