Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surpressing multiple brs #49

Open
xelax90 opened this issue May 24, 2017 · 4 comments
Open

Surpressing multiple brs #49

xelax90 opened this issue May 24, 2017 · 4 comments

Comments

@xelax90
Copy link

xelax90 commented May 24, 2017

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!
@soundasleep
Copy link
Owner

soundasleep commented May 26, 2017

I'm actually fine with your example!

As long as something like that continues to work:

Hello


lets test this<br><br>

Cheers!

should turn into

Hello lets test this

Cheers!

PR welcome! I don't think you need to make it an option.

@giovannilima262
Copy link

giovannilima262 commented Oct 10, 2019

Include this.
<p>Hello</p> <br/> <p>lets test this</p><br/> <p> Cheers!</p>

Hello


lets test this


Cheers!

@NirvashPrime
Copy link

I put in a PR a few days ago to address this:

#75

@WebCimes
Copy link

Same here, it would be great that multiple "br" like start<br><br><br>end works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@xelax90 @soundasleep @giovannilima262 @NirvashPrime @WebCimes and others