cebe / cebe/markdown

GFM: Line break using a backslash

Open
#169 1 comment 0 reactions 0 assignees View on GitHub
enhancement gfm
Dominant language
HTML
Stars
1k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

The GFM spec specifies that to make a line break, [a backslash can be used](https://github.github.com/gfm/#hard-line-breaks) so it is more visible. It also better because some editors automatically remove trailing whitespace.

The `GithubMarkdown` class [doesn't support those](http://markdown.cebe.cc/try?flavor=gfm&text=test%5C%0D%0Atest). 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.