docs(import): trim auto-embed comment

This commit is contained in:
Philipinho
2026-05-16 21:53:25 +01:00
parent e5ff58a73a
commit fcb2b08cf3
@@ -104,12 +104,8 @@ export function defaultHtmlFormatter($: CheerioAPI, $root: Cheerio<any>) {
normalizeTableColumnWidths($, $root); normalizeTableColumnWidths($, $root);
applyConfluenceMarginLeftIndent($, $root); applyConfluenceMarginLeftIndent($, $root);
// Auto-embed only when the <a> is the SOLE meaningful child of its parent // Auto-embed only when the <a> is the sole meaningful child of its parent
// block (the "naked URL on its own line" pattern editors use as the // block. A link mixed with surrounding text stays an inline link.
// embed-intent signal). Otherwise body-text links to YouTube/Vimeo/Loom
// get silently turned into fullscreen iframes, which is rarely what the
// author wanted — Confluence's storage format has the `widget` macro for
// explicit embeds, handled separately in the API converter.
$root.find('a[href]').each((_, el) => { $root.find('a[href]').each((_, el) => {
const $el = $(el); const $el = $(el);
const url = $el.attr('href')!; const url = $el.attr('href')!;