soundasleep/html2text

Surpressing multiple brs

Offen

#49 geöffnet am 24.05.2017

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (138 Forks)github user discovery
hacktoberfest

Repository-Metriken

Stars
 (485 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

In your code you remove 'unnecessary empty lines':

// remove unnecessary empty lines
$output = preg_replace("/\n\n\n*/im", "\n\n", $output);

This actually leads to the removal of intended empty lines (at least in my case). It would be great to have some configuration for things like this. Should I submit a PR for this?

Just to give you an example:

Hello <br><br><br> lets test this <br><br><br> Cheers!

is converted to

Hello

lets test this

Cheers!

But I would expect:

Hello


lets test this


Cheers!

Contributor Guide