erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

Parsedown ignores multiple line breaks inside pre/code #727

Closed gabrielbarros closed 2 years ago

gabrielbarros commented 4 years ago

For example:

This is a test

    function test1() {

    }

    function test2() {

    }

Expected output:

expected

Given output:

result

aidantwoods commented 2 years ago

Not yet released, but 2.0 will the number of line breaks that occurred properly (rather than just whether or not a line break occurred), so going to close this. This is also fixed in https://github.com/erusev/parsedown/pull/610, and is fixed in the beta releases of 1.8.x (but this version won't be released in non-beta due to compatibility concerns with extensions).