diff --git a/src/__snapshots__/index.test.js.snap b/src/__snapshots__/index.test.js.snap index a46d0a0..c951318 100644 --- a/src/__snapshots__/index.test.js.snap +++ b/src/__snapshots__/index.test.js.snap @@ -29,6 +29,14 @@ exports[`should allow overriding code element with components version 1`] = ` `; +exports[`should allow overriding codeblock element with components version 1`] = ` +
+
+ code +
+
+`; + exports[`should be able to combine in compilation 1`] = `

{ expect(tree).toMatchSnapshot(); }); +it('should allow overriding codeblock element with components version', () => { + const compile = marksyComponents({ + createElement, + elements: { + code() { + return
code
+ } + } + }); + const compiled = compile('```js\nconst foo = "bar"\n```'); + + const tree = renderer.create( + {compiled.tree} + ).toJSON(); + + expect(tree).toMatchSnapshot(); +}); + it('should highlight code with highlight.js', () => { const compile = marksy({ createElement,