This commit is contained in:
35
node_modules/remark-parse/lib/util/interrupt.js
generated
vendored
Normal file
35
node_modules/remark-parse/lib/util/interrupt.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = interrupt
|
||||
|
||||
function interrupt(interruptors, tokenizers, ctx, params) {
|
||||
var length = interruptors.length
|
||||
var index = -1
|
||||
var interruptor
|
||||
var config
|
||||
|
||||
while (++index < length) {
|
||||
interruptor = interruptors[index]
|
||||
config = interruptor[1] || {}
|
||||
|
||||
if (
|
||||
config.pedantic !== undefined &&
|
||||
config.pedantic !== ctx.options.pedantic
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (
|
||||
config.commonmark !== undefined &&
|
||||
config.commonmark !== ctx.options.commonmark
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (tokenizers[interruptor[0]].apply(ctx, params)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user