mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:01:14 +08:00
FIX: Autolines were duplicating some text
This commit is contained in:
@ -49,6 +49,7 @@ Discourse.Dialect.on("register", function(event) {
|
|||||||
|
|
||||||
if (remaining && remaining.match(/\n/)) {
|
if (remaining && remaining.match(/\n/)) {
|
||||||
next.unshift(MD.mk_block(remaining));
|
next.unshift(MD.mk_block(remaining));
|
||||||
|
remaining = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,10 @@ test("Links", function() {
|
|||||||
'<p>EvilTrout: <a href="http://eviltrout.com">http://eviltrout.com</a></p>',
|
'<p>EvilTrout: <a href="http://eviltrout.com">http://eviltrout.com</a></p>',
|
||||||
"autolinks a URL");
|
"autolinks a URL");
|
||||||
|
|
||||||
|
cooked("EvilTrout: http://eviltrout.com hello",
|
||||||
|
'<p>EvilTrout: <a href="http://eviltrout.com">http://eviltrout.com</a> hello</p>',
|
||||||
|
"autolinks with trailing text");
|
||||||
|
|
||||||
cooked("here is [an example](http://twitter.com)",
|
cooked("here is [an example](http://twitter.com)",
|
||||||
'<p>here is <a href="http://twitter.com">an example</a></p>',
|
'<p>here is <a href="http://twitter.com">an example</a></p>',
|
||||||
"supports markdown style links");
|
"supports markdown style links");
|
||||||
|
Reference in New Issue
Block a user