diff --git a/test/javascripts/lib/markdown-test.js.es6 b/test/javascripts/lib/markdown-test.js.es6 index 2420f51d182..e97442b9f9a 100644 --- a/test/javascripts/lib/markdown-test.js.es6 +++ b/test/javascripts/lib/markdown-test.js.es6 @@ -1,6 +1,7 @@ module("Discourse.Markdown", { setup: function() { Discourse.SiteSettings.traditional_markdown_linebreaks = false; + Discourse.SiteSettings.default_code_lang = "auto"; } }); @@ -337,25 +338,25 @@ test("Code Blocks", function() { "it supports basic code blocks"); cooked("```json\n{hello: 'world'}\n```\ntrailing", - "
{hello: 'world'}
\n\ntrailing
", + "{hello: 'world'}
\n\ntrailing
", "It does not truncate text after a code block."); cooked("```json\nline 1\n\nline 2\n\n\nline3\n```", - "line 1\n\nline 2\n\n\nline3
",
+ "line 1\n\nline 2\n\n\nline3
",
"it maintains new lines inside a code block.");
cooked("hello\nworld\n```json\nline 1\n\nline 2\n\n\nline3\n```",
- "hello
world
line 1\n\nline 2\n\n\nline3
",
+ "hello
world
line 1\n\nline 2\n\n\nline3
",
"it maintains new lines inside a code block with leading content.");
cooked("```ruby\n<header>hello</header>
",
+ "<header>hello</header>
",
"it escapes code in the code block");
- cooked("```text\ntext\n```", "text
", "handles text without adding class");
+ cooked("```text\ntext\n```", "text
", "handles text by adding nohighlight");
cooked("```ruby\n# cool\n```",
- "# cool
",
+ "# cool
",
"it supports changing the language");
cooked(" ```\n hello\n ```",
@@ -363,11 +364,11 @@ test("Code Blocks", function() {
"only detect ``` at the begining of lines");
cooked("```ruby\ndef self.parse(text)\n\n text\nend\n```",
- "def self.parse(text)\n\n text\nend
",
+ "def self.parse(text)\n\n text\nend
",
"it allows leading spaces on lines in a code block.");
cooked("```ruby\nhello `eviltrout`\n```",
- "hello `eviltrout`
",
+ "hello `eviltrout`
",
"it allows code with backticks in it");
cooked("```eviltrout\nhello\n```",