Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add strikethrough, silly name
  • Loading branch information
kellyjosephprice committed Feb 9, 2021
commit dda1861b889e448fda298a7f75ac0b93be81eef4
22 changes: 22 additions & 0 deletions __tests__/__snapshots__/disabling-tokenizers.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ Object {
}
`;

exports[`disabling delete 1`] = `
Object {
"children": Array [
Object {
"children": Array [
Object {
"children": Array [
Object {
"type": "text",
"value": "strikethrough",
},
],
"type": "delete",
},
],
"type": "paragraph",
},
],
"type": "root",
}
`;

exports[`disabling emphasis 1`] = `
Object {
"children": Array [
Expand Down
7 changes: 7 additions & 0 deletions __tests__/disabling-tokenizers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ test('disabling emphasis', () => {
expect(markdown.mdast(md, opts)).toMatchSnapshot();
});

test('disabling delete', () => {
const md = '~~strikethrough~~';
const opts = { disableTokenizers: { inline: ['deletion'] } };

expect(markdown.mdast(md, opts)).toMatchSnapshot();
});

test('disabling block tokenizer', () => {
const md = '# heading 1';
const opts = { disableTokenizers: { block: ['atxHeading'] } };
Expand Down