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

rtrim » chop

This commit is contained in:
Emanuil Rusev 2014-01-23 13:07:15 +02:00
parent 01a147c574
commit 0c61f71e3f

View File

@ -73,7 +73,7 @@ class Parsedown
$text = $this->parse_block_elements($lines); $text = $this->parse_block_elements($lines);
$text = rtrim($text, "\n"); $text = chop($text, "\n");
return $text; return $text;
} }
@ -291,7 +291,7 @@ class Parsedown
if ($element['type'] === 'paragraph' and isset($element['interrupted']) === false) if ($element['type'] === 'paragraph' and isset($element['interrupted']) === false)
{ {
$chopped_line = rtrim($line); $chopped_line = chop($line);
$i = 1; $i = 1;
@ -325,7 +325,7 @@ class Parsedown
if ($position > 1) # tag if ($position > 1) # tag
{ {
$name = substr($deindented_line, 1, $position - 1); $name = substr($deindented_line, 1, $position - 1);
$name = rtrim($name); $name = chop($name);
if (substr($name, -1) === '/') if (substr($name, -1) === '/')
{ {