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
1 changed files with 3 additions and 0 deletions

View File

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