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

#3241 - Adds &nbsp's for each paragraph rather than the last one #3303

Merged
merged 9 commits into from
Mar 23, 2021

Conversation

berdjabrahamian
Copy link
Contributor

@berdjabrahamian berdjabrahamian commented Feb 24, 2021

Fixes #3241

Before

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus orci a turpis vestibulum ornare.</p><p>Pellentesque interdum at odio ut tristique. Quisque in dui non turpis eleifend dignissim.</p><p>Etiam ultricies sem massa, imperdiet lobortis velit luctus eu. Morbi bibendum tortor vel ultricies&nbsp;tempor.</p>

After

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus orci a turpis vestibulum&nbsp;ornare.</p><p>Pellentesque interdum at odio ut tristique. Quisque in dui non turpis eleifend&nbsp;dignissim.</p><p>Etiam ultricies sem massa, imperdiet lobortis velit luctus eu. Morbi bibendum tortor vel ultricies&nbsp;tempor.</p>

However, it doesnt take into consideration the params. Will push an update to add support for that.

@duncanmcclean
Copy link
Member

Hey! From the looks of things, doesn't look your text to close the issue will work. Would you mind re-wording to Closes #x instead, that should work!

@berdjabrahamian
Copy link
Contributor Author

Updated widont completely to utilize params as well - since we have noted it in the docs - as well as added tests for different variations.

@berdjabrahamian
Copy link
Contributor Author

Im not sure why the tests are failing and what im missing

@jasonvarga
Copy link
Member

I think it the EODs needed their indentation removed. I updated that for you. Tests are running...

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small changes, but otherwise this is wonderful, thanks!

src/Modifiers/CoreModifiers.php Outdated Show resolved Hide resolved
src/Support/Str.php Outdated Show resolved Hide resolved
src/Support/Str.php Outdated Show resolved Hide resolved
tests/Modifiers/WidontTest.php Outdated Show resolved Hide resolved
@jasonvarga jasonvarga merged commit 1899d3b into statamic:3.0 Mar 23, 2021
@jasonvarga
Copy link
Member

Thanks, very nice!

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

Successfully merging this pull request may close these issues.

Widont modifier only affecting last paragraph with Bard
3 participants