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 5, 2021
1 parent 35e8ccf commit 3b94de5
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 {directive} from 'micromark-extension-directive'
import {directiveFromMarkdown, directiveToMarkdown} from 'mdast-util-directive'

let warningIssued

export default function remarkDirective() {
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-directive] Warning: please upgrade to remark 13 to use this plugin'
)
}

add('micromarkExtensions', directive())
add('fromMarkdownExtensions', directiveFromMarkdown)
add('toMarkdownExtensions', directiveToMarkdown)
Expand Down

0 comments on commit 3b94de5

Please sign in to comment.