diff --git a/tests/markdown/mustache-span.test.js b/tests/markdown/mustache-span.test.js index 6d249ebcb..e7c65ea77 100644 --- a/tests/markdown/mustache-span.test.js +++ b/tests/markdown/mustache-span.test.js @@ -105,6 +105,22 @@ test('Renders a mustache span with text, id, class and a couple of css propertie expect(rendered).toBe('text'); }); +test('Two consecutive injections into Inline', function() { + const source = '{{dog Sample Text}}{cat}{toad}'; + const rendered = Markdown.render(source); + // FIXME: Drops original attributes in favor of injection, rather than adding. + // FIXME: Doesn't keep the raw text of second injection. + // FIXME: Renders the extra class attribute (which is dropped by the browser). + expect(rendered).toBe('

Sample Text

\n'); +}); + +test('Two consecutive injections into Block', function() { + const source = '{{dog\nSample Text\n}}\n{cat}\n{toad}'; + const rendered = Markdown.render(source); + // FIXME: Renders the extra class attribute (which is dropped by the browser). + expect(rendered).toBe('

Sample Text

\n

{toad}

\n'); +}); + // TODO: add tests for ID with accordance to CSS spec: // // From https://drafts.csswg.org/selectors/#id-selectors: