File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
* Fix an issue where source locations tracked through variable references could
4
4
potentially become incorrect.
5
+ * Fix a bug where a loud comment in the source can break the source map when
6
+ embedding the sources, when using the command-line interface or the legacy JS
7
+ API.
5
8
6
9
## 1.51.0
7
10
Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ String _writeSourceMap(
174
174
url = p.toUri (p.relative (sourceMapPath, from: p.dirname (destination)));
175
175
}
176
176
177
+ var escapedUrl = url.toString ().replaceAll ("*/" , '%2A/' );
178
+
177
179
return (options.style == OutputStyle .compressed ? '' : '\n\n ' ) +
178
- '/*# sourceMappingURL=$url */' ;
180
+ '/*# sourceMappingURL=$escapedUrl */' ;
179
181
}
Original file line number Diff line number Diff line change @@ -405,7 +405,8 @@ RenderResult _newRenderResult(
405
405
: p.toUri (outFile == null
406
406
? sourceMapPath
407
407
: p.relative (sourceMapPath, from: p.dirname (outFile)));
408
- css += "\n\n /*# sourceMappingURL=$url */" ;
408
+ var escapedUrl = url.toString ().replaceAll ("*/" , '%2A/' );
409
+ css += "\n\n /*# sourceMappingURL=$escapedUrl */" ;
409
410
}
410
411
}
411
412
You can’t perform that action at this time.
0 commit comments