From 5f7dfe58398bb2f17f3b12fbe8c5be2e34c83006 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Wed, 5 Sep 2018 20:22:44 +0900 Subject: [PATCH] Add test of html option with header and footer It has reported in yhatt/marp#243. These elements have over-sanitized regular markdown syntaxes. --- test/marp.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/marp.ts b/test/marp.ts index 3b63e1b4..c91a3396 100644 --- a/test/marp.ts +++ b/test/marp.ts @@ -154,6 +154,14 @@ describe('Marp', () => { const { html } = marp().render('allow
break') expect(cheerio.load(html)('br')).toHaveLength(1) }) + + it('does not sanitize header and footer', () => { + const markdown = '' + const $ = cheerio.load(marp().render(markdown).html) + + expect($('header > strong')).toHaveLength(1) + expect($('footer > em')).toHaveLength(1) + }) }) context('with true', () => {