fix: handle flash players

This commit is contained in:
2026-02-15 19:52:44 +01:00
parent 94695b5aef
commit 56e5987341
3 changed files with 33 additions and 1 deletions

View File

@@ -265,6 +265,21 @@ export class ImportAnalysisEngine {
}, },
}); });
// Custom rule for Flash embeds - replace with placeholder text
this.turndown.addRule('flashEmbed', {
filter: (node) => {
if (node.nodeName !== 'EMBED') return false;
const embed = node as HTMLEmbedElement;
const type = embed.getAttribute('type') || '';
const src = embed.getAttribute('src') || '';
// Match Flash content by type or file extension
return type.toLowerCase().includes('flash') ||
type.toLowerCase().includes('shockwave') ||
src.toLowerCase().endsWith('.swf');
},
replacement: () => 'FLASH PLAYER NOT SUPPORTED',
});
// Load macro definitions from shared config // Load macro definitions from shared config
this.loadMacroConfigsFromShared(); this.loadMacroConfigsFromShared();
} }

View File

@@ -178,6 +178,21 @@ export class ImportExecutionEngine extends EventEmitter {
return `![${altText}](${imageUrl})`; return `![${altText}](${imageUrl})`;
}, },
}); });
// Custom rule for Flash embeds - replace with placeholder text
this.turndown.addRule('flashEmbed', {
filter: (node) => {
if (node.nodeName !== 'EMBED') return false;
const embed = node as HTMLEmbedElement;
const type = embed.getAttribute('type') || '';
const src = embed.getAttribute('src') || '';
// Match Flash content by type or file extension
return type.toLowerCase().includes('flash') ||
type.toLowerCase().includes('shockwave') ||
src.toLowerCase().endsWith('.swf');
},
replacement: () => 'FLASH PLAYER NOT SUPPORTED',
});
} }
setProjectContext(projectId: string, dataDir?: string): void { setProjectContext(projectId: string, dataDir?: string): void {

View File

@@ -14,4 +14,6 @@ categories:
author: hugo author: hugo
publishedAt: '2011-09-04T14:50:06.000Z' publishedAt: '2011-09-04T14:50:06.000Z'
--- ---
Anstelle die Bilder schon hier hinzupacken gibt es nur einen Verweis auf ein Album von Bildern die meine Schwiegermutter gemacht hat - die offiziellen Fotos warten noch etwas (und ich selber hab ja keine gemacht). FLASH PLAYER NOT SUPPORTED Anstelle die Bilder schon hier hinzupacken gibt es nur einen Verweis auf ein Album von Bildern die meine Schwiegermutter gemacht hat - die offiziellen Fotos warten noch etwas (und ich selber hab ja keine gemacht).
FLASH PLAYER NOT SUPPORTED