summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-markdown/test/page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-markdown/test/page.js')
-rw-r--r--packages/gitbook-markdown/test/page.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/gitbook-markdown/test/page.js b/packages/gitbook-markdown/test/page.js
index 8486435..67c209d 100644
--- a/packages/gitbook-markdown/test/page.js
+++ b/packages/gitbook-markdown/test/page.js
@@ -20,8 +20,14 @@ describe('Page parsing', function() {
assert(LEXED[0].content);
});
- it('should escape codeblocks in preparation', function() {
+ it('should escape codeblocks in preparation (1)', function() {
assert.equal(page.prepare("Hello `world`"), "Hello {% raw %}`world`{% endraw %}");
+ assert.equal(page.prepare("Hello `world test`"), "Hello {% raw %}`world test`{% endraw %}");
+ assert.equal(page.prepare("Hello ```world test```"), "Hello {% raw %}```world test```{% endraw %}");
+ assert.equal(page.prepare("Hello\n```js\nworld test\n```\n"), "Hello\n{% raw %}```js\nworld test\n```{% endraw %}\n");
+ });
+
+ it('should escape codeblocks in preparation (2)', function() {
assert.equal(
page.prepare("Hello\n\n\n\tworld\n\thello\n\n\ntest"),
"Hello\n{% raw %}\n\n\tworld\n\thello\n\n\n{% endraw %}test"