markdown icon indicating copy to clipboard operation
markdown copied to clipboard

GFM: Line break using a backslash

Open ArthaTi opened this issue 6 years ago • 1 comments

The GFM spec specifies that to make a line break, a backslash can be used so it is more visible. It also better because some editors automatically remove trailing whitespace.

The GithubMarkdown class doesn't support those. Only double-space breaks are allowed. It would be really nice if that feature would be added.

I tried doing this myself, but renderText receives line text and the backslash as separate blocks, so I kinda failed there. Also, what would be the preferred way to do this? Is changing the escape code parser necessary?

ArthaTi avatar Apr 09 '19 10:04 ArthaTi

The GithubMarkdown class doesn't support those. Only double-space breaks are allowed. It would be really nice if that feature would be added.

seems it is a newly added feature.

  • \ is a marker for the parseEscape function, so extending it should allow implementing this:

https://github.com/cebe/markdown/blob/eeb1bf622e80f337479e00a5db94c56e7cf1326b/Parser.php#L368-L378

have not checked it in detail though.

cebe avatar Apr 10 '19 08:04 cebe