'use strict'; const { decodeEntities } = require('../core/util'); /** * Convert sanitized description HTML fragments to Markdown. Handles the tags * the sanitizer allows; anything unexpected degrades to its text content. */ function htmlToMarkdown(html) { if (!html) return ''; let out = String(html); // tables first (their inner tags would otherwise be consumed) out = out.replace(/