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

Disable HARDWRAPS markdown extension #972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miquella
Copy link

@miquella miquella commented Dec 4, 2015

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.

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.
@gitblit
Copy link
Collaborator

gitblit commented Dec 6, 2015

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

@miquella
Copy link
Author

miquella commented Dec 8, 2015

@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.

@gitblit
Copy link
Collaborator

gitblit commented Dec 10, 2015

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.

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 this pull request may close these issues.

2 participants