Skip to content

Commit

Permalink
Add name
Browse files Browse the repository at this point in the history
Closes GH-4.

Reviewed-by: Titus Wormer <[email protected]>
  • Loading branch information
shlroland authored Jul 5, 2024
1 parent ffa5ca5 commit 2354da5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/lib/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function gfmStrikethrough(options) {
const options_ = options || {}
let single = options_.singleTilde
const tokenizer = {
name: 'strikethrough',
tokenize: tokenizeStrikethrough,
resolveAll: resolveAllStrikethrough
}
Expand Down
13 changes: 13 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ test('micromark-extension-gfm-strikethrough', async function (t) {
)
})

await test.test(
'should skip strikethrough construct if `disable.null` includes `strikethrough`',
async function () {
assert.deepEqual(
micromark('a ~~b~~', {
extensions: [gfmStrikethrough(), {disable: {null: ['strikethrough']}}],
htmlExtensions: [gfmStrikethroughHtml()]
}),
'<p>a ~~b~~</p>'
)
}
)

test('fixtures', async function (t) {
const base = new URL('fixtures/', import.meta.url)

Expand Down

0 comments on commit 2354da5

Please sign in to comment.