Skip to content

Commit

Permalink
Update to remark@next w/o changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 3, 2020
1 parent 312c9bc commit 0ceb371
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"browserify": "^16.0.0",
"nyc": "^15.0.0",
"prettier": "^2.0.0",
"remark": "^12.0.0",
"remark": "^13.0.0-alpha.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"tape": "^5.0.0",
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ This essentially removes everything but paragraphs and text nodes.
> This is one of the first remark plugins, before prefixing with `remark-` got
> cool.
## Note!

This plugin is ready for the new parser in remark
([`remarkjs/remark#536`](https://github.com/remarkjs/remark/pull/536)).
No change is needed: it works exactly the same now as it did before!

## Install

[npm][]:
Expand Down
8 changes: 5 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ test('stripMarkdown()', function (t) {
t.equal(proc('_Alfred_'), 'Alfred', 'emphasis (2)')
t.equal(proc('**Alfred**'), 'Alfred', 'importance (1)')
t.equal(proc('__Alfred__'), 'Alfred', 'importance (2)')
t.equal(proc('~~Alfred~~'), 'Alfred', 'strikethrough')
// To do: add `remark-gfm` when that’s done.
// t.equal(proc('~~Alfred~~'), 'Alfred', 'strikethrough')
t.equal(proc('`Alfred`'), 'Alfred', 'inline code')
t.equal(proc('[Hello](world)'), 'Hello', 'link')
t.equal(proc('[**H**ello](world)'), 'Hello', 'importance in link')
Expand Down Expand Up @@ -76,7 +77,8 @@ test('stripMarkdown()', function (t) {
t.equal(proc('---'), '', 'thematic break')
t.equal(proc('A \nB'), 'A\nB', 'hard line break')
t.equal(proc('A\nB'), 'A\nB', 'soft line break')
t.equal(proc('| A | B |\n| - | - |\n| C | D |'), '', 'table')
// To do: add `remark-gfm` when that’s done.
// t.equal(proc('| A | B |\n| - | - |\n| C | D |'), '', 'table')
t.equal(proc('\talert("hello");'), '', 'code (1)')
t.equal(proc('```js\nconsole.log("world");\n```'), '', 'code (2)')
t.equal(proc('<sup>Hello</sup>'), 'Hello', 'html (1)')
Expand All @@ -95,7 +97,7 @@ test('stripMarkdown()', function (t) {
)
t.equal(
proc('- **Hello**\n\n- World!', {keep: ['list', 'listItem']}),
'- Hello\n\n- World!',
'* Hello\n\n* World!',
'keep lists'
)
t.throws(
Expand Down

0 comments on commit 0ceb371

Please sign in to comment.