mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
parent
ede9c81e0b
commit
1a5eb2a2e3
@ -3,6 +3,11 @@
|
||||
* Properly generate source maps for stylesheets that emit `@charset`
|
||||
declarations.
|
||||
|
||||
### Command-Line Interface
|
||||
|
||||
* Don't error out when passing `--embed-source-maps` along with
|
||||
`--embed-sources` for stylesheets that contain non-ASCII characters.
|
||||
|
||||
## 1.13.2
|
||||
|
||||
* Properly parse `:nth-child()` and `:nth-last-child()` selectors with
|
||||
|
@ -142,7 +142,8 @@ String _writeSourceMap(
|
||||
|
||||
Uri url;
|
||||
if (options.embedSourceMap) {
|
||||
url = new Uri.dataFromString(sourceMapText, mimeType: 'application/json');
|
||||
url = new Uri.dataFromString(sourceMapText,
|
||||
mimeType: 'application/json', encoding: utf8);
|
||||
} else {
|
||||
var sourceMapPath = destination + '.map';
|
||||
ensureDir(p.dirname(sourceMapPath));
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: sass
|
||||
version: 1.13.3-dev
|
||||
version: 1.13.3
|
||||
description: A Sass implementation in Dart.
|
||||
author: Dart Team <misc@dartlang.org>
|
||||
homepage: https://github.com/sass/dart-sass
|
||||
|
@ -274,6 +274,23 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {
|
||||
test("doesn't generate a source map file", () async {
|
||||
await d.nothing("out.css.map").validate();
|
||||
});
|
||||
|
||||
// Regression test for #457.
|
||||
test("--embed-sources works with non-ASCII characters", () async {
|
||||
await d.file("test.scss", "a {b: '▼'}").create();
|
||||
await (await runSass([
|
||||
"--embed-source-map",
|
||||
"--embed-sources",
|
||||
"test.scss",
|
||||
"out.css"
|
||||
]))
|
||||
.shouldExit(0);
|
||||
var css = readFile(d.path("out.css"));
|
||||
map = embeddedSourceMap(css);
|
||||
|
||||
expect(map, containsPair("sources", ["test.scss"]));
|
||||
expect(map, containsPair("sourcesContent", ["a {b: '▼'}"]));
|
||||
});
|
||||
});
|
||||
|
||||
group("with the target in a different directory", () {
|
||||
|
Loading…
Reference in New Issue
Block a user