mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 11:21:03 +03:00
Line break not working in comment #199
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rlgo on GitHub (Jun 4, 2022).
Write two line comment but still display as one line after save.


But if add an empty line in between, it works


@ejo090 commented on GitHub (Jun 4, 2022):
Since Planka uses Markdown for the description and comment fields of cards, it is possible to break lines according to Markdown notation.
Planka uses remarkjs/react-markdown as a renderer and remarkjs/remark-gfm as a plugin.
The specification is available at GitHub Flavored Markdown Spec.
The line breaks are also described in the GFM Spec mentioned above.
(e.g. 6.12 Hard line breaks, 6.13 Soft line breaks )
If a blank line is inserted between comment1 and comment2, it looks like a line break because the paragraph changes.
(Figure omitted.)(e.g. 4.8 Paragraphs)
Hard Line Break(with two spaces =


<br>equivalent)Hard Line Break(with


\=<br>equivalent )Soft Line Break(Line breaks only in the editor = replaced by space)


The problem is that the GFM Spec differs from the behavior on github.com that we are using.
On our github.com, line breaks in the editor are interpreted as "hard line breaks".
It may be a good idea to add remarkjs/remark-breaks to handle this.
@ejo090 commented on GitHub (Jun 4, 2022):
I applied remarkjs/remark-breaks, which probably fulfills what @rlgo wants.
(I forgot to mention that the language setting is Japanese. Sorry.)
("コメントを追加" means "Add comment")
@nickbe commented on GitHub (Jun 5, 2022):
Thanks for the effort to explain all this. In fact I didn't realize the line break problem myself so far simply because I don't use comments as extensively as other users.
Please feel free to make a pull request on this.
@meltyshev Using a more convienent way for the line breaks is a very good idea.