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

Merge pull request #671 from aidantwoods/fix/line-ending-standardisation

Ensure line-breaks get standardised when using Parsedown via `line` method
This commit is contained in:
Aidan Woods 2018-10-16 18:51:05 +01:00 committed by GitHub
commit 72f9ca92ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1120,6 +1120,9 @@ class Parsedown
protected function lineElements($text, $nonNestables = array()) protected function lineElements($text, $nonNestables = array())
{ {
# standardize line breaks
$text = str_replace(array("\r\n", "\r"), "\n", $text);
$Elements = array(); $Elements = array();
$nonNestables = (empty($nonNestables) $nonNestables = (empty($nonNestables)