Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit fe81fa3

Browse files
authored
Emit tab characters as \9 (#104)
Closes #103
1 parent 5991bee commit fe81fa3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

doc-src/SASS_CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* Table of contents
44
{:toc}
55

6+
## 3.7.3 (Unreleased)
7+
8+
* Emit escaped tab characters in identifiers as `\9` rather than a backslash
9+
followed by a literal tab.
10+
611
## 3.7.2 (8 November 2018)
712

813
* Fix more escaped-whitespace edge cases.

lib/sass/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def normalize_ident_escapes(ident, start: true)
269269
at_start = start && $1
270270
char = escaped_char(s)
271271
next char if char =~ (at_start ? Sass::SCSS::RX::NMSTART : Sass::SCSS::RX::NMCHAR)
272-
if char =~ (at_start ? /[\x0-\x8\xA-\x1F\x7F0-9]/ : /[\x0-\x8\xA-\x1F\x7F]/)
272+
if char =~ (at_start ? /[\x0-\x1F\x7F0-9]/ : /[\x0-\x1F\x7F]/)
273273
"\\#{char.ord.to_s(16)} "
274274
else
275275
"\\#{char}"

test/sass/engine_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@ def test_numeric_formatting_of_integers
33253325

33263326
def test_escaped_semicolons_are_not_compressed
33273327
assert_equal(<<'CSS', render(<<'SASS', :syntax => :scss, :style => :compressed))
3328-
div{color:#f00000\ \0 \;}
3328+
div{color:#f00000\9 \0 \;}
33293329
CSS
33303330
div {
33313331
color: #f00000\9\0\;

0 commit comments

Comments
 (0)