fix: use alt -> title -> filename

This commit is contained in:
2026-02-15 09:31:42 +01:00
parent 416a7ad5d3
commit b730f12ba0
4 changed files with 16 additions and 5 deletions

View File

@@ -432,6 +432,9 @@ describe('ImportExecutionEngine E2E Tests', () => {
// Image with proper alt inside link should preserve the alt text
expect(content).toContain('![Company Logo](http://example.com/logo.png)');
// Image with title but empty alt should use title as alt text (title takes precedence over filename)
expect(content).toContain('![Delicious Piroggen](http://example.com/wp-content/uploads/2020/03/dish.jpg');
// Should NOT have empty image alt text (the broken pattern we're fixing)
expect(content).not.toMatch(/!\[\]\([^)]+\)/);
});