summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-markdown/test
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-markdown/test')
-rw-r--r--packages/gitbook-markdown/test/page.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/gitbook-markdown/test/page.js b/packages/gitbook-markdown/test/page.js
index 8e253f6..6ed6d96 100644
--- a/packages/gitbook-markdown/test/page.js
+++ b/packages/gitbook-markdown/test/page.js
@@ -46,6 +46,13 @@ describe('Page parsing', function() {
);
});
+ it('should escape codeblocks with nunjucks tags in {% raw %} tags', function() {
+ assert.equal(
+ page.prepare('{% raw %}Hello {{ "Bonjour" }} ```test```{% endraw %}'),
+ '{% raw %}Hello {{ "Bonjour" }} ```test```{% endraw %}'
+ );
+ });
+
it('should not process math', function() {
assert.equal(page.prepare("Hello $world$"), "Hello $world$");
assert.equal(page.prepare("Hello $$world$$"), "Hello $$world$$");