Skip to content

Commit e54c3d9

Browse files
committed
fix: trim the body before using it.
1 parent 6b663f7 commit e54c3d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
return trim($line);
1717
}, explode("\n", $text, 3));
1818

19-
$hints[] = '$hints[] = [' . var_export($category, true) . ', ' . var_export($author, true) . ', "' . strtr($body, ["\r\n" => '\n', "\n" => '\n', "\t" => '\t', "\"" => '\"', "'" => '\'']) . '"];';
19+
$hints[] = '$hints[] = [' . var_export($category, true) . ', ' . var_export($author, true) . ', "' . strtr(trim($body), ["\r\n" => '\n', "\n" => '\n', "\t" => '\t', "\"" => '\"', "'" => '\'']) . '"];';
2020
}
2121

2222
$body = file_get_contents(__DIR__ . '/../index.php.src');

0 commit comments

Comments
 (0)