summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-markdown/test/page.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2015-03-12 20:09:59 +0100
committerSamy Pessé <samypesse@gmail.com>2016-12-22 15:00:40 +0100
commitf8156d7e4b1bc79b53c4bc18f8e3f3a0e5a37ec5 (patch)
treed2e41fd6527c5b711618f5fe14b94bcaf1b21e01 /packages/gitbook-markdown/test/page.js
parentb9c76689831f86e3ca090966bca1abb4a9ae8fb9 (diff)
downloadgitbook-f8156d7e4b1bc79b53c4bc18f8e3f3a0e5a37ec5.zip
gitbook-f8156d7e4b1bc79b53c4bc18f8e3f3a0e5a37ec5.tar.gz
gitbook-f8156d7e4b1bc79b53c4bc18f8e3f3a0e5a37ec5.tar.bz2
Update tests to reflect annotator
Diffstat (limited to 'packages/gitbook-markdown/test/page.js')
-rw-r--r--packages/gitbook-markdown/test/page.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/gitbook-markdown/test/page.js b/packages/gitbook-markdown/test/page.js
index 6190ee7..c047301 100644
--- a/packages/gitbook-markdown/test/page.js
+++ b/packages/gitbook-markdown/test/page.js
@@ -21,28 +21,28 @@ describe('Page parsing', function() {
});
it('should escape codeblocks in preparation (1)', function() {
- assert.equal(page.prepare("Hello `world`"), "\nHello {% raw %}`world`{% endraw %}\n");
- assert.equal(page.prepare("Hello `world test`"), "\nHello {% raw %}`world test`{% endraw %}\n");
- assert.equal(page.prepare("Hello ```world test```"), "\nHello {% raw %}`world test`{% endraw %}\n");
- assert.equal(page.prepare("Hello\n```js\nworld test\n```\n"), "\nHello\n{% raw %}\n```js\nworld test\n```\n{% endraw %}");
- assert.equal(page.prepare("Hello\n```\ntest\n\tworld\n\ttest\n```"), "\nHello\n{% raw %}\n```\ntest\n world\n test\n```\n{% endraw %}");
+ 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```\n{% endraw %}");
+ assert.equal(page.prepare("Hello\n```\ntest\n\tworld\n\ttest\n```"), "Hello\n{% raw %}```\ntest\n\tworld\n\ttest\n```{% endraw %}");
});
it('should escape codeblocks in preparation (2)', function() {
assert.equal(
page.prepare("Hello\n\n\n\tworld\n\thello\n\n\ntest"),
- "\nHello\n{% raw %}\n```\nworld\nhello\n```\n{% endraw %}\ntest\n"
+ "Hello\n\n\n{% raw %}\tworld\n\thello\n\n\n{% endraw %}test"
);
assert.equal(
page.prepare("Hello\n\n\n\tworld\n\thello\n\n\n"),
- "\nHello\n{% raw %}\n```\nworld\nhello\n```\n{% endraw %}"
+ "Hello\n\n\n{% raw %}\tworld\n\thello\n\n\n{% endraw %}"
);
});
it('should escape codeblocks with nunjucks tags', function() {
assert.equal(
page.prepare('Hello {{ "Bonjour" }} ```test```'),
- '\nHello {{ "Bonjour" }} {% raw %}`test`{% endraw %}\n'
+ 'Hello {{ "Bonjour" }} {% raw %}```test```{% endraw %}'
);
});
});