fix: handle flash players

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

No files matched your search

+15
View File
@@ -264,6 +264,21 @@ export class ImportAnalysisEngine {
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',
});
// Load macro definitions from shared config
this.loadMacroConfigsFromShared();
+15
View File
@@ -178,6 +178,21 @@ export class ImportExecutionEngine extends EventEmitter {
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 {
+3 -1
View File
@@ -14,4 +14,6 @@ categories:
author: hugo
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