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 22
33* Fix an issue where source locations tracked through variable references could
44 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.
58
69## 1.51.0
710
Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ String _writeSourceMap(
174174 url = p.toUri (p.relative (sourceMapPath, from: p.dirname (destination)));
175175 }
176176
177+ var escapedUrl = url.toString ().replaceAll ("*/" , '%2A/' );
178+
177179 return (options.style == OutputStyle .compressed ? '' : '\n\n ' ) +
178- '/*# sourceMappingURL=$url */' ;
180+ '/*# sourceMappingURL=$escapedUrl */' ;
179181}
Original file line number Diff line number Diff line change @@ -405,7 +405,8 @@ RenderResult _newRenderResult(
405405 : p.toUri (outFile == null
406406 ? sourceMapPath
407407 : 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 */" ;
409410 }
410411 }
411412
You can’t perform that action at this time.
0 commit comments