From 249904f01c9f2ce788f1988787575a515e058bbe Mon Sep 17 00:00:00 2001 From: Brandon Mills Date: Sat, 13 May 2017 19:36:14 -0400 Subject: [PATCH] Chore: Add test for code fences without blank lines (#72) Refs #69 --- tests/lib/processor.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/lib/processor.js b/tests/lib/processor.js index 4f84458..34b888e 100644 --- a/tests/lib/processor.js +++ b/tests/lib/processor.js @@ -257,6 +257,22 @@ describe("processor", function() { assert.equal(blocks.length, 1); }); + it("should find code fences not surrounded by blank lines", function() { + var code = [ + "", + "```js", + "var answer = 6 * 7;", + "```", + "Paragraph text", + "```js", + "var answer = 6 * 7;", + "```" + ].join("\n"); + var blocks = processor.preprocess(code); + + assert.equal(blocks.length, 2); + }); + it("should return the source code in the block", function() { var code = [ "```js",