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

Optionally Preserving New Lines #115

Merged
merged 5 commits into from
Aug 12, 2021

Conversation

wilso199
Copy link
Contributor

#70 Allowing for new lines to be preserved in paragraph elements.

I wasn't sure where to place the tests for this functionality. If you could provide some direction, I am happy to add them.

@muesli
Copy link
Contributor

muesli commented Aug 11, 2021

Fantastic, thank you! I wonder if WithNewLines is the best name tho. Maybe WithPreservedNewLines is a bit more accurate & self-explanatory?

@wilso199
Copy link
Contributor Author

@muesli I agree with you - WithPreservedNewLines is more understandable. I have modified the name of the function and the render options boolean to match. Thanks for the feedback!

@muesli
Copy link
Contributor

muesli commented Aug 11, 2021

Thank you, that looks good to me! Would you mind also adding a test for this new functionality?

@muesli muesli added the enhancement New feature or request label Aug 11, 2021
@wilso199
Copy link
Contributor Author

wilso199 commented Aug 11, 2021

Added a test case here for the preserve new line functionality. I am fairly new to Go, so if there is an easier way to accomplish this test I am happy to adjust the it based on any feedback you have.

@muesli muesli merged commit 8ea7b1c into charmbracelet:master Aug 12, 2021
@muesli
Copy link
Contributor

muesli commented Aug 12, 2021

That looks just fine! The testdata is a bit all over the place as we use the style examples as additional test input. Even though I think that makes sense, it probably just confuses people a bit. Thank you for your contribution ❤️

@muesli muesli added the renderer Everything related to the markdown renderer label Aug 12, 2021
@wilso199 wilso199 deleted the preserve-new-lines branch August 12, 2021 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request renderer Everything related to the markdown renderer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants