Skip to content

Commit

Permalink
Remove warning for remark 12
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 6, 2021
1 parent 1785879 commit 0846014
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
import {gfm} from 'micromark-extension-gfm'
import {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'

let warningIssued

export default function remarkGfm(options) {
const data = this.data()

// Old remark.
/* c8 ignore next 14 */
if (
!warningIssued &&
((this.Parser &&
this.Parser.prototype &&
this.Parser.prototype.blockTokenizers) ||
(this.Compiler &&
this.Compiler.prototype &&
this.Compiler.prototype.visitors))
) {
warningIssued = true
console.warn(
'[remark-gfm] Warning: please upgrade to remark 13 to use this plugin'
)
}

add('micromarkExtensions', gfm(options))
add('fromMarkdownExtensions', gfmFromMarkdown)
add('toMarkdownExtensions', gfmToMarkdown(options))
Expand Down

0 comments on commit 0846014

Please sign in to comment.