#43 Markdown parser putting <br> tags in the middle of ordinary paragraph text

Open
opened 4 years ago by pharpend · 6 comments

I have this repository: https://notabug.org/pharpend/hcal

Gogs's markdown parser is ainserting <br> tags in the middle of ordinary markdown. These <br>s are inserted where there are ordinary mid-paragraph line breaks.

Case in point:

# Installation

First, you have to
[install Haskell](https://github.com/bitemyapp/learnhaskell#getting-set-up). Due
to a
[long-standing bug in the Haskell package manager](https://github.com/haskell/cabal/issues/220),
some of HCal's dependencies won't get pulled in, so you have to install them
manually.

    cabal update
    cabal install alex happy gtk2hs-buildtools

I don't have a version of HCal on Hackage yet, so the best way to install it is
to clone the git repo

    git clone ssh://git@notabug.org/pharpend/hcal.git
    cd hcal
    cabal install

It's ordinary markdown with line breaks for readability in the editor. It renders like this:

Which is obviously incorrect.

I have this repository: https://notabug.org/pharpend/hcal Gogs's markdown parser is ainserting `<br>` tags in the middle of ordinary markdown. These `<br>`s are inserted where there are ordinary mid-paragraph line breaks. Case in point: # Installation First, you have to [install Haskell](https://github.com/bitemyapp/learnhaskell#getting-set-up). Due to a [long-standing bug in the Haskell package manager](https://github.com/haskell/cabal/issues/220), some of HCal's dependencies won't get pulled in, so you have to install them manually. cabal update cabal install alex happy gtk2hs-buildtools I don't have a version of HCal on Hackage yet, so the best way to install it is to clone the git repo git clone ssh://git@notabug.org/pharpend/hcal.git cd hcal cabal install It's ordinary markdown with line breaks for readability in the editor. It renders like this: ![](https://a.pomf.se/ghigxo.png) Which is obviously incorrect.
i commented 4 years ago
https://github.com/gogits/gogs/issues/1009
Peter Harpending commented 4 years ago
Poster

@i I don't think that's quite relevant here. I don't have trailing whitespace

@i I don't think that's quite relevant here. I don't have trailing whitespace
i commented 4 years ago

@pharpend I may have misunderstood, but isn't the problem here that gogs is inserting a <br> tag everytime there is a line break in the markdown source (I too have this problem)? Because if so, https://github.com/gogits/gogs/issues/1009 is supposed to be the open issue for that.

Btw, I didn't say you have trailing whitespace, nor do I see how #1009 does either?

@pharpend I may have misunderstood, but isn't the problem here that gogs is inserting a `<br>` tag everytime there is a line break in the markdown source (I too have this problem)? Because if so, https://github.com/gogits/gogs/issues/1009 is supposed to be the open issue for that. Btw, I didn't say you have trailing whitespace, nor do I see how `#1009` does either?
zPlus commented 3 years ago

Has this been fixed with the new upgrade?

Has this been fixed with the new upgrade?
zPlus commented 1 year ago

According to this reply by @Unknwon, this issue has been fixed by adding a new setting called ENABLE_HARD_LINE_BREAK, which on NaB is available here.

According to [this reply](https://github.com/gogits/gogs/issues/1009#issuecomment-136697919) by @Unknwon, this issue has been fixed by adding a new setting called `ENABLE_HARD_LINE_BREAK`, which on NaB is available [here](https://notabug.org/hp/gogs/src/master/conf/app.ini#L137).
zPlus commented 1 year ago

This too should be closed as fixed, unless I'm missing something.

This too should be closed as fixed, unless I'm missing something.
Sign in to join this conversation.
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.