diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-04-02 15:01:49 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 15:00:44 +0100 |
commit | d9bbc2fe0a280d05795594e49c22413a0b5b71c4 (patch) | |
tree | 5bcbf1a33a75666a21c89a5b646d9b55eec6258f /packages/gitbook-markdown/test/page.js | |
parent | e572570c43beee7b2df5aa562662290010bf2ab7 (diff) | |
download | gitbook-d9bbc2fe0a280d05795594e49c22413a0b5b71c4.zip gitbook-d9bbc2fe0a280d05795594e49c22413a0b5b71c4.tar.gz gitbook-d9bbc2fe0a280d05795594e49c22413a0b5b71c4.tar.bz2 |
Don't escape code block if already in escaped block
Diffstat (limited to 'packages/gitbook-markdown/test/page.js')
-rw-r--r-- | packages/gitbook-markdown/test/page.js | 7 |
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$$"); |