gitblit icon indicating copy to clipboard operation
gitblit copied to clipboard

Disable HARDWRAPS markdown extension

Open miquella opened this issue 10 years ago • 3 comments

The HARDWRAPS extension is intended to be used like GitHub Flavored Markdown (GFM). GFM only uses hard wraps in comments, whereas the markdown rendered by GitBlit is generally documents not comments.

miquella avatar Dec 04 '15 21:12 miquella

This disables wraps for everything. Maybe we need two methods instead of reversing the behavior for all uses.

gitblit avatar Dec 06 '15 17:12 gitblit

@gitblit: ah, good point.

I'm happy to extend this, what things are you thinking need to not change? My only intention was to change documentation type markdown rendering, but I'm not completely familiar with Gitblit, so I'm not sure what areas allow for comments and would need to stay the same.

miquella avatar Dec 08 '15 16:12 miquella

I think the change here may be small - if we put it in the right place. Like GH, GB allows for Markdown in Ticket comments. Assuming your assertion about line wraps is correct - and I have to admit I've noticed some line-ending inconsistencies so I'm sure you are right - the MarkdownUtils.transformGFM() entry-point needs to preserve hardwraps. This method which is used to Tickets eventually calls MarkdownUtils.transformMarkdown(String, LinkRenderer), the one you proposed changing.

I'm flexible on an exact solution here.... new method, new arguments, whatever.

gitblit avatar Dec 10 '15 14:12 gitblit