Unknown opened 1 year ago
|
||||||||||
OneDev uses flexmark (https://github.com/vsch/flexmark-java) to render markdown. And it is intentionally to break line in this case in recent versions (advertise as a change). I guess they have a reason to do this, and also personally I find it to be more convenient. |
||||||||||
More convienient how? It breaks up the markdown file which forces people to put everything on a single line to prevent it being separated out, this makes markdown harder to maintain. Some text editors like vscode do automatically wrap it to the next line without inserting a newline character, which means this wouldn't break markdown, but as I use neovim, it can be hard navigating and also modifying markdown when wrapped, and new lining it will cause it to separate into different paragraphs. Thus, this is a large pain! |
||||||||||
It works the same way as in email or other text editors. I guess user not familiar with markdown will feel strange if their intentionally breaked lines are rendered as a single whole line. |
||||||||||
This breaks conventions though: https://www.markdownguide.org/basic-syntax/#paragraphs-1 Markdown clearly supports this and then flexmark decides to go and break convention? This is like me coming along to a protocol and thinking screw this I am going to ignore the specification and implement whatever I like! This severely angers me how the flexmark developers come along and just break from convention, if you are going to wrap a format, YOU FOLLOW THE CONVENTION! I guess this is not something I should be discussing here as it was not you which made the change, I guess this is a discussion I should have over on flexmarks github (I doubt they will reply though, they do not seem to be the most active). |
||||||||||
If you require more proof, here is more documentation from another source: https://daringfireball.net/projects/markdown/syntax#p |
||||||||||
They might have some options to tweak the behavior. Haven't checked that though. |
||||||||||
I know this is not standard. |
||||||||||
This behaviour being default is a big enough issue alone, you should always follow conventions, when you break from conventions you cause major disruption within the programming community. I am aware you like this behaviour, so it is not terrible for you, but it is a pain in the a** for me! |
||||||||||
Wait, you mentioned emails as well. You use the same standard for parsing text based emails, because again that is unconventional. Text based emails use single line breaks to be able to easier to write instead of having long lines, and then it can be mapped to the size of the screen (thunderbird handles this functionality very well). |
||||||||||
Text based emails of course are not parsed with markdown parser. |
||||||||||
I mean not with the markdown parser, I mean the text based emails parsed in the same way, by including newlines which are added to allow text based emails to be easier to write. Obviously you wouldn't use a markdown parser to parse a text based email xD |
||||||||||
Robin Shen changed fields 1 year ago
|
||||||||||
Turns out that flexmark default is comforming to markdown standard on this regard. I added an option to alter its behavior for my convenience. Since this does not conform to standard, I will remove this option in next patch release. |
||||||||||
Robin Shen changed title 1 year ago
|
||||||||||
Thanks Robin :) |
||||||||||
OneDev changed state to 'Closed' 1 year ago
|
||||||||||
State changed as code fixing the issue is committed |
||||||||||
OneDev changed state to 'Released' 1 year ago
|
||||||||||
State changed as build #3293 is successful |
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Affected Versions |
Not Found
|
The current markdown parsing is not compliant with the standard, when rendering the README.md on my projects, I have realised that line breaks are rendered in Onedev, when they shouldn't
Should be rendered as
Hello world
Should be rendered as:
But currently the first is rendered as the second, which is not compliant with markdown, you should have a blank line to indicate new lines, markdown supports line wrapping, which allows for long paragraphs to be split across many lines without breaking up the content, currently onedev splits up the content when it is split onto multiple lines.