mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 08:34:04 +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);
|
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')!;
|
||||||
|
|||||||
Reference in New Issue
Block a user