UNPKG

@diplodoc/transform

Version:

A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML

29 lines 975 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.yfm007 = void 0; exports.yfm007 = { names: ['YFM007', 'term-used-without-definition'], description: 'Term used without definition', tags: ['term'], function: function YFM007(params, onError) { const { config } = params; if (!config) { return; } params.tokens.forEach((el) => { var _a; return (_a = el.children) === null || _a === void 0 ? void 0 : _a.filter((token) => { return token.type === '__yfm_lint'; }).forEach((term) => { // @ts-expect-error bad markdownlint typings if (term.attrGet('YFM007')) { onError({ lineNumber: term.lineNumber, context: term.line, }); } }); }); }, }; //# sourceMappingURL=yfm007.js.map