From a7a7387da14381c09938b5bf935b26f2d0555421 Mon Sep 17 00:00:00 2001
From: Robin Ward brussel sproutes are awful.My fake plants died because I did not pretend to water them.
+
+**/
+Discourse.Dialect.registerInline('"', function(str, match, prev) {
+
+ // Make sure we're on a line boundary
+ var last = prev[prev.length - 1];
+ if (typeof last === "string") { return; }
+
+ if (str.length > 2 && str.charAt(0) === '"' && str.charAt(str.length-1) === '"') {
+ var inner = str.substr(1, str.length-2);
+ if (inner.indexOf('"') === -1 && inner.indexOf("\n") === -1) {
+ return [str.length, ['blockquote', inner]];
+ }
+ }
+});
\ No newline at end of file
diff --git a/test/javascripts/lib/markdown_test.js b/test/javascripts/lib/markdown_test.js
index a5af3ac1745..56348270a8a 100644
--- a/test/javascripts/lib/markdown_test.js
+++ b/test/javascripts/lib/markdown_test.js
@@ -29,6 +29,14 @@ test("basic cooking", function() {
cooked("brussel sproutes are *awful*.", "My fake plants died because I did not pretend to water them.
\"hello
world\"
"hello "evil" trout"
', "it doesn't format quotes in the middle of a line"); +}); + test("Traditional Line Breaks", function() { var input = "1\n2\n3"; cooked(input, "1
2
3