From ef36a619c3c2e93b3253d18f0d830d878014cdb8 Mon Sep 17 00:00:00 2001
From: riking {hello: 'world'}
trailing
", + "{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```",