Skip to content

Commit 958dd87

Browse files
committed
issue2551094 - simplemde now handles linebreaks like markdown backends
Single newlines in simplemde editor were not being displayed with hard linebreaks. Original patch changed Markdown and Markdown2 backends to implement non-standard hard linebreak on embedded newline. Mistune does not support that without having to write a new plugin. Rather than changing the backends, change the simplemde frontend call to not support github flavored markdown support where newline is the same as having two trailing spaces followed by a newline (markdown standard for embedding a linebreak).
1 parent ebc9a85 commit 958dd87

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Fixed:
3636
cheeseshop. (John Rouillard)
3737
- issue2551093 - return plain text if markdown formatter throws exception
3838
(reported by Cedric Krier, fix by John Rouillard)
39+
- issue2551094 - make simplemde handle line breaks the same as the
40+
backend markdown formmatters. (report: Cedric Krier, patch: Christof
41+
Meerwald)
3942

4043
Features:
4144
- issue2550522 - Add 'filter' command to command-line

share/roundup/templates/jinja2/html/issue.item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
var node = $('#change_note')[0];
3333
var initSimpleMde = function () {
3434
node.parentNode.appendChild($('<input/>', { type: 'hidden', name: 'msg-1@type', value: 'text/markdown'})[0]);
35-
var simplemde = new SimpleMDE({ element: node, status: false, styleSelectedText: false });
35+
var simplemde = new SimpleMDE({ element: node, status: false, styleSelectedText: false, renderingConfig: {singleLineBreaks: false}});
3636
simplemde.render();
3737
};
3838
{% if context.id %}

0 commit comments

Comments
 (0)