Skip to content

Commit

Permalink
Merge pull request #29 from marp-team/over-sanitized-header-footer
Browse files Browse the repository at this point in the history
Fix over-sanitized header and footer
  • Loading branch information
yhatt authored Sep 6, 2018
2 parents 2ce194e + bc05b48 commit 04d3d6e
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 570 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

- Fix over-sanitized header and footer by updating [@marp-team/marpit v0.0.15](https://github.com/marp-team/marpit/pull/66) ([#29](https://github.com/marp-team/marp-core/pull/29))

## v0.0.5 - 2018-09-02

### Added
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"@babel/core": "^7.0.0",
"@types/cheerio": "^0.22.9",
"@types/jest": "^23.3.1",
"autoprefixer": "^9.1.3",
"autoprefixer": "^9.1.5",
"babel-core": "^7.0.0-0",
"babel-jest": "^23.4.2",
"cheerio": "^1.0.0-rc.2",
"codecov": "^3.0.4",
"codecov": "^3.1.0",
"cssnano": "^4.1.0",
"github-markdown-css": "^2.10.0",
"jest": "^23.5.0",
Expand All @@ -59,10 +59,10 @@
"postcss-url": "^8.0.0",
"prettier": "^1.14.2",
"rimraf": "^2.6.2",
"rollup": "^0.65.0",
"rollup": "^0.65.2",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-json": "^3.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-postcss": "^1.6.2",
"rollup-plugin-terser": "^2.0.2",
"rollup-plugin-typescript": "^0.8.1",
Expand All @@ -77,7 +77,7 @@
"typescript": "^3.0.3"
},
"dependencies": {
"@marp-team/marpit": "^0.0.14",
"@marp-team/marpit": "^0.0.15",
"emoji-regex": "^7.0.1",
"highlight.js": "^9.12.0",
"katex": "^0.10.0-rc.1",
Expand Down
9 changes: 9 additions & 0 deletions test/marp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ describe('Marp', () => {
const { html } = marp().render('allow<br>break')
expect(cheerio.load(html)('br')).toHaveLength(1)
})

// https://github.com/yhatt/marp/issues/243
it('does not sanitize header and footer', () => {
const markdown = '<!--\nheader: "**header**"\nfooter: "*footer*"\n-->'
const $ = cheerio.load(marp().render(markdown).html)

expect($('header > strong')).toHaveLength(1)
expect($('footer > em')).toHaveLength(1)
})
})

context('with true', () => {
Expand Down
Loading

0 comments on commit 04d3d6e

Please sign in to comment.