diff --git a/tests/markdown/mustache-syntax.test.js b/tests/markdown/mustache-syntax.test.js index e6bb9cee5..bfe6261fc 100644 --- a/tests/markdown/mustache-syntax.test.js +++ b/tests/markdown/mustache-syntax.test.js @@ -110,23 +110,11 @@ describe('Inline: When using the Inline syntax {{ }}', ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('text'); }); - it('Renders an image with added attributes', function() { - const source = dedent`![homebrew mug](https://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px,a="b and c",d=e}`; - const rendered = Markdown.render(source).trimReturns(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

homebrew mug

`); - }); - - it('Render a span with added attributes', function() { + it('Renders a span with added attributes', function() { const source = 'Text and {{pen,#author,color:orange,font-family:"trebuchet ms",a="b and c",d=e, text}} and more text!'; const rendered = Markdown.render(source); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

Text and text and more text!

\n'); }); - - it('Render a div with added attributes', function() { - const source = '{{pen,#author,color:orange,font-family:"trebuchet ms",a="b and c",d=e\nText and text and more text!\n}}\n'; - const rendered = Markdown.render(source); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

Text and text and more text!

\n
'); - }); }); // BLOCK SYNTAX @@ -219,6 +207,11 @@ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{ expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

Sample text.

`); }); + it('Renders a div with added attributes', function() { + const source = '{{pen,#author,color:orange,font-family:"trebuchet ms",a="b and c",d=e\nText and text and more text!\n}}\n'; + const rendered = Markdown.render(source); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

Text and text and more text!

\n
'); + }); }); // MUSTACHE INJECTION SYNTAX @@ -279,6 +272,12 @@ describe('Injection: When an injection tag follows an element', ()=>{ const rendered = Markdown.render(source).trimReturns(); expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('

text{background:blue}

'); }); + + it('Renders an image with added attributes', function() { + const source = `![homebrew mug](https://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px,a="b and c",d=e}`; + const rendered = Markdown.render(source).trimReturns(); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`

homebrew mug

`); + }); }); describe('and that element is a block', ()=>{