mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 00:14:10 +08:00
docs(import): trim auto-embed comment
This commit is contained in:
@@ -104,12 +104,8 @@ export function defaultHtmlFormatter($: CheerioAPI, $root: Cheerio<any>) {
|
||||
normalizeTableColumnWidths($, $root);
|
||||
applyConfluenceMarginLeftIndent($, $root);
|
||||
|
||||
// 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
|
||||
// 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.
|
||||
// Auto-embed only when the <a> is the sole meaningful child of its parent
|
||||
// block. A link mixed with surrounding text stays an inline link.
|
||||
$root.find('a[href]').each((_, el) => {
|
||||
const $el = $(el);
|
||||
const url = $el.attr('href')!;
|
||||
|
||||
Reference in New Issue
Block a user