v3.ocaml.org-rescript icon indicating copy to clipboard operation
v3.ocaml.org-rescript copied to clipboard

Line breaks inserted into the markdown

Open lucas-deangelis opened this issue 4 years ago • 1 comments

Newlines in paragraphs are replaced with line breaks (<br> tags) in the readme of the packages from opam. Here is a visible example, on the package opam-publish:

Screenshot from 2022-01-05 01-29-36.

I've quickly tested omd, and omd doesn't insert <br> tags, so the problem seems to be coming from somewhere else. I've also looked through the different projects concerning the v3 website, but I haven't been able to find where the markdown is transformed into HTML, or the transformations/templates that the packages pages use. If anyone can point me in the right direction, I would love to take the time to fix this.

lucas-deangelis avatar Jan 05 '22 00:01 lucas-deangelis

Okay, after searching for a bit, this is one of the page that's served by Dream, using the template packge_overview.eml here. The render function receives a readme and passes it to <%s! readme %>, which according to the Dream documentation is supposed to print the code literally. The readme itself seems to be rendered as HTML on this line. I'll try running the application tomorrow and see the state of the HTML before and after the conversion.

lucas-deangelis avatar Jan 05 '22 01:01 lucas-deangelis