mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Revert "FIX: You couldn't span multiple lines with bold or italics"
This reverts commit 423d37a2b6
.
Conflicts:
test/javascripts/lib/markdown_test.js
This commit is contained in:
parent
8866141ba2
commit
717f57c968
2 changed files with 4 additions and 2 deletions
|
@ -23,7 +23,7 @@ var replaceMarkdown = function(match, tag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var endText = new RegExp("[^\\s|" + match[0] + "]" + match.replace(/\*/g,"\\*") + "([^" + match[0] + "]|$)");
|
var endText = new RegExp("[^\\s|" + match[0] + "]" + match.replace(/\*/g,"\\*") + "([^" + match[0] + "]|$)");
|
||||||
var finish = text.search(endText);
|
var finish = text.split("\n")[0].search(endText);
|
||||||
if(finish && finish >= 0) {
|
if(finish && finish >= 0) {
|
||||||
var newText = text.substring(match.length,finish+1);
|
var newText = text.substring(match.length,finish+1);
|
||||||
newText = this.processInline(newText);
|
newText = this.processInline(newText);
|
||||||
|
|
|
@ -278,7 +278,9 @@ test("bold and italics", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("New Lines", function() {
|
test("New Lines", function() {
|
||||||
cooked("_abc\ndef_", "<p><em>abc<br>def</em></p>", "it allows markup to span new lines");
|
// Note: This behavior was discussed and we determined it does not make sense to do this
|
||||||
|
// unless you're using traditional line breaks
|
||||||
|
cooked("_abc\ndef_", "<p>_abc<br>def_</p>", "it does not allow markup to span new lines");
|
||||||
cooked("_abc\n\ndef_", "<p>_abc</p>\n\n<p>def_</p>", "it does not allow markup to span new paragraphs");
|
cooked("_abc\n\ndef_", "<p>_abc</p>\n\n<p>def_</p>", "it does not allow markup to span new paragraphs");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue