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.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/gitbook-markdown/test/page.js b/packages/gitbook-markdown/test/page.js
index ca3b4ef..8f4b5c5 100644
--- a/packages/gitbook-markdown/test/page.js
+++ b/packages/gitbook-markdown/test/page.js
@@ -20,6 +20,11 @@ describe('Page parsing', function() {
assert(LEXED[0].content);
});
+ it('should not add id to headings', function() {
+ assert.equal(page('# Hello').sections[0].content, '<h1>Hello</h1>\n');
+ assert.equal(page('# Hello {#test}').sections[0].content, '<h1 id="test">Hello </h1>\n');
+ });
+
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 %}");