Update lib/md033.mjs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Rod 2025-09-17 03:46:45 -03:00 committed by GitHub
parent d1dd6b33ad
commit cf807dfb86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,9 +14,8 @@ export default {
let allowedElements = params.config.allowed_elements; let allowedElements = params.config.allowed_elements;
allowedElements = Array.isArray(allowedElements) ? allowedElements : []; allowedElements = Array.isArray(allowedElements) ? allowedElements : [];
allowedElements = allowedElements.map((element) => element.toLowerCase()); allowedElements = allowedElements.map((element) => element.toLowerCase());
let tableAllowedElements = params.config.table_allowed_elements; let tableAllowedElements = params.config.table_allowed_elements ?? allowedElements;
// if not defined, use allowedElements for backward compatibility tableAllowedElements = Array.isArray(tableAllowedElements) ? tableAllowedElements : [];
tableAllowedElements = Array.isArray(tableAllowedElements) ? tableAllowedElements : allowedElements;
tableAllowedElements = tableAllowedElements.map((element) => element.toLowerCase()); tableAllowedElements = tableAllowedElements.map((element) => element.toLowerCase());
for (const token of filterByTypesCached([ "htmlText" ], true)) { for (const token of filterByTypesCached([ "htmlText" ], true)) {
const htmlTagInfo = getHtmlTagInfo(token); const htmlTagInfo = getHtmlTagInfo(token);