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

New line behavior #34

Closed
ryantate-amp opened this issue Jan 7, 2025 · 3 comments · Fixed by #36
Closed

New line behavior #34

ryantate-amp opened this issue Jan 7, 2025 · 3 comments · Fixed by #36

Comments

@ryantate-amp
Copy link

I'm seeing a single new line in a paragraph producing a <br> in the final markdown. I'm pretty sure GFM ignores the first new line character and you need a second one before it produces a line break.

Example to reproduce:

/tmp for w in this is a paragraph; do echo $w >> README.md; done/tmp go-grip README.md &
[1] 81428/tmp 🚀 Starting server: http://localhost:6419/README.md/tmp curl -s localhost:6419/README.md | htmlq .container-inner
<div class="container-inner">
        <p>this<br>
is<br>
a<br>
paragraph</p>

      </div>
@YanWittmann
Copy link

I'm experiencing the same with my documents

Image

would look like this on GH:

Image

I usually break my lines at the 120 chars line, so I'm having linebreaks everywhere.

@chrishrb chrishrb linked a pull request Feb 10, 2025 that will close this issue
@YanWittmann
Copy link

YanWittmann commented Feb 10, 2025

Edit: Please ignore this comment, it works perfectly fine. Thank you.

Image


IGNORE THIS:

While I am thankful for the quick reaction @chrishrb, I'm not sure if we were talking about the same thing, because even with your fix in ac122df, I still appear to get the same linebreaks I got before, here's an example with your readme file where I inserted a linebreak and still get the <br/> as before:

This project is a reimplementation of the original Python-based [grip](https://github.com/joeyespo/grip),
which uses GitHub's web API for rendering. By eliminating the reliance on external APIs, go-grip delivers similar functionality while being fully self-contained, faster, and more secure - perfect for offline use or privacy-conscious users.

Image

@YanWittmann
Copy link

Please read my edit, it works perfectly fine. Thank you.

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 a pull request may close this issue.

2 participants