mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +08:00
Automatically convert some quotes to blockquotes
This commit is contained in:
@ -29,6 +29,14 @@ test("basic cooking", function() {
|
||||
cooked("brussel sproutes are *awful*.", "<p>brussel sproutes are <em>awful</em>.</p>", "it doesn't swallow periods.");
|
||||
});
|
||||
|
||||
test("Auto quoting", function() {
|
||||
cooked('"My fake plants died because I did not pretend to water them."',
|
||||
"<p><blockquote>My fake plants died because I did not pretend to water them.</blockquote></p>",
|
||||
"it converts single line quotes to blockquotes");
|
||||
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");
|
||||
});
|
||||
|
||||
test("Traditional Line Breaks", function() {
|
||||
var input = "1\n2\n3";
|
||||
cooked(input, "<p>1<br/>2<br/>3</p>", "automatically handles trivial newlines");
|
||||
|
Reference in New Issue
Block a user