1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

improve the code that removes \r characters

This commit is contained in:
Emanuil 2013-08-31 19:54:14 +03:00
parent 609ad47c38
commit 4a6bb88239

View File

@ -50,7 +50,8 @@ class Parsedown
$text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text);
# Removes \r characters.
$text = str_replace("\r", '', $text);
$text = str_replace("\r\n", "\n", $text);
$text = str_replace("\r", "\n", $text);
# Replaces tabs with spaces.
$text = str_replace("\t", ' ', $text);