Skip to content

Concatenation/interpolation results in unrecognised character #2320

@nickdunn

Description

@nickdunn

When concatenating two characters together, some combinations result in unrecognised characters being output.

The following test case is a real-world case where I want to append a non-breaking space (\feff) to another character that is used in an icon font.

$char-f: '\66';
$char-g: '\67';

.test-1 {
  content: '#{$char-f}\feff';
}

.test-2 {
  content: '#{$char-g}\feff';
}

// this is broken
.test-3 {
  content: '\feff#{$char-f}';
}

.test-4 {
  content: '\feff#{$char-g}';
}

Output:

@charset "UTF-8";
.test-1 {
  content: "f";
}

.test-2 {
  content: "g";
}

.test-3 {
  content: "󾿿";
}

.test-4 {
  content: "g";
}

(Note that \feff is present in 3 of the 4 examples, but it's invisible).

When \feff is concatenated with \66 a single unrecognised character is returned rather than two.

I've been able to replicate this with the latest https://github.com/sass/node-sass wrapper, as well as pasting the above into http://sass.js.org.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions