1234567891011121314151617181920212223242526272829303132333435 |
- 'use strict'
- module.exports = interrupt
- function interrupt(interruptors, tokenizers, ctx, parameters) {
- 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, parameters)) {
- return true
- }
- }
- return false
- }
|