@diplodoc/transform
Version:
A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML
28 lines • 814 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.yfm004 = void 0;
exports.yfm004 = {
names: ['YFM004', 'table-not-closed'],
description: 'Table not closed',
tags: ['table'],
function: function YFM004(params, onError) {
const { config } = params;
if (!config) {
return;
}
params.tokens
.filter((token) => {
return token.type === '__yfm_lint';
})
.forEach((table) => {
// @ts-expect-error bad markdownlint typings
if (table.attrGet('YFM004')) {
onError({
lineNumber: table.lineNumber,
context: table.line,
});
}
});
},
};
//# sourceMappingURL=yfm004.js.map