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:
Robin Ward 2014-07-28 13:17:39 -04:00
parent 8866141ba2
commit 717f57c968
2 changed files with 4 additions and 2 deletions

View file

@ -23,7 +23,7 @@ var replaceMarkdown = function(match, tag) {
}
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) {
var newText = text.substring(match.length,finish+1);
newText = this.processInline(newText);

View file

@ -278,7 +278,9 @@ test("bold and italics", 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");
});