FIX: auto-quote should not trigger when the first " is preceded by bbcode-like garbage.
This commit is contained in:
parent
b19ad15086
commit
9124cf0eaf
|
@ -36,6 +36,7 @@ test("Auto quoting", function() {
|
||||||
"it converts single line quotes to blockquotes");
|
"it converts single line quotes to blockquotes");
|
||||||
cooked('"hello\nworld"', "<p>\"hello<br/>world\"</p>", "It doesn't convert multi line quotes");
|
cooked('"hello\nworld"', "<p>\"hello<br/>world\"</p>", "It doesn't convert multi line quotes");
|
||||||
cooked('"hello "evil" trout"', '<p>"hello "evil" trout"</p>', "it doesn't format quotes in the middle of a line");
|
cooked('"hello "evil" trout"', '<p>"hello "evil" trout"</p>', "it doesn't format quotes in the middle of a line");
|
||||||
|
cooked('["text"', '<p>["text"</p>', "it recognizes leading tag-like text");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Traditional Line Breaks", function() {
|
test("Traditional Line Breaks", function() {
|
||||||
|
|
|
@ -662,7 +662,7 @@
|
||||||
return [consumed, null, nodes];
|
return [consumed, null, nodes];
|
||||||
}
|
}
|
||||||
|
|
||||||
var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ), patterns );
|
var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ), patterns, [text.substr(0, consumed)]);
|
||||||
consumed += res[ 0 ];
|
consumed += res[ 0 ];
|
||||||
// Add any returned nodes.
|
// Add any returned nodes.
|
||||||
nodes.push.apply( nodes, res.slice( 1 ) );
|
nodes.push.apply( nodes, res.slice( 1 ) );
|
||||||
|
|
Loading…
Reference in New Issue