Skip to content

Commit 73a539d

Browse files
committed
pretty-print newlines in data url paths
1 parent edaf32a commit 73a539d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/bundler/bundler.go

+4
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,10 @@ func (s *scanner) maybeParseFile(
12111211
if path.Namespace == "dataurl" {
12121212
if _, ok := resolver.ParseDataURL(path.Text); ok {
12131213
prettyPath = path.Text
1214+
if len(prettyPath) > 65 {
1215+
prettyPath = prettyPath[:65]
1216+
}
1217+
prettyPath = strings.ReplaceAll(prettyPath, "\n", "\\n")
12141218
if len(prettyPath) > 64 {
12151219
prettyPath = prettyPath[:64] + "..."
12161220
}

0 commit comments

Comments
 (0)