Skip to content

Commit f6a9da2

Browse files
authored
fix: Replace newline with space when converting SVG to PNG (DenverCoder1#605)
1 parent fff3312 commit f6a9da2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/card.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,9 @@ function convertSvgToPng(string $svg, int $cardWidth): string
697697
// remove style and animations
698698
$svg = removeAnimations($svg);
699699

700+
// replace newlines with spaces
701+
$svg = str_replace("\n", " ", $svg);
702+
700703
// escape svg for shell
701704
$svg = escapeshellarg($svg);
702705

0 commit comments

Comments
 (0)