dashboardjavacloudcoapiotiot-analyticsiot-platformiot-solutionskafkalwm2mmicroservicesmiddlewaremqttnettyplatformsnmpthingsboardvisualizationwebsocketswidgets
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
647 B
35 lines
647 B
'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
|
|
}
|
|
|