diff --git a/test/expected/inline-code.md b/test/expected/inline-code.md new file mode 100644 index 0000000..3f6380f --- /dev/null +++ b/test/expected/inline-code.md @@ -0,0 +1,9 @@ + + +- [The `log-in` element](#the-log-in-element) + + + +## The `log-in` element + +Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat. \ No newline at end of file diff --git a/test/fixtures/inline-code.md b/test/fixtures/inline-code.md new file mode 100644 index 0000000..e904922 --- /dev/null +++ b/test/fixtures/inline-code.md @@ -0,0 +1,5 @@ + + +## The `log-in` element + +Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat. \ No newline at end of file diff --git a/test/test.js b/test/test.js index f29e77f..7e6f7c0 100644 --- a/test/test.js +++ b/test/test.js @@ -435,4 +435,9 @@ describe('toc.insert', function() { assert.equal(toc.insert(read('test/fixtures/commented-header.md')), read('test/expected/commented-header.md')); }) + + it('should not strip inline code', function() { + assert.equal(toc.insert(read('test/fixtures/inline-code.md')), read('test/expected/inline-code.md')) + }) + });