diff --git a/src/main/engine/ImportAnalysisEngine.ts b/src/main/engine/ImportAnalysisEngine.ts index 4660f6f..4a2fcca 100644 --- a/src/main/engine/ImportAnalysisEngine.ts +++ b/src/main/engine/ImportAnalysisEngine.ts @@ -169,6 +169,7 @@ export class ImportAnalysisEngine { headingStyle: 'atx', codeBlockStyle: 'fenced', bulletListMarker: '-', + emDelimiter: '*', }); // Custom rule for list items: use single space after marker instead of multiple spaces diff --git a/src/main/engine/ImportExecutionEngine.ts b/src/main/engine/ImportExecutionEngine.ts index 42389b2..c181e24 100644 --- a/src/main/engine/ImportExecutionEngine.ts +++ b/src/main/engine/ImportExecutionEngine.ts @@ -83,6 +83,7 @@ export class ImportExecutionEngine extends EventEmitter { headingStyle: 'atx', codeBlockStyle: 'fenced', bulletListMarker: '-', + emDelimiter: '*', }); // Custom rule for list items: use single space after marker instead of multiple spaces diff --git a/tests/engine/ImportAnalysisEngine.test.ts b/tests/engine/ImportAnalysisEngine.test.ts index a8f0ed8..2353d9a 100644 --- a/tests/engine/ImportAnalysisEngine.test.ts +++ b/tests/engine/ImportAnalysisEngine.test.ts @@ -805,8 +805,8 @@ describe('ImportAnalysisEngine', () => { const report = await engine.analyzeWxr(wxrData, '/test.xml'); - // Should use title as alt text and include title in markdown - expect(report.posts.items[0].markdownPreview).toContain('![My Title](http://example.com/full.jpg "My Title")'); + // Should use title as alt text (but not include title in markdown - cleaner output) + expect(report.posts.items[0].markdownPreview).toContain('![My Title](http://example.com/full.jpg)'); }); it('should extract filename as alt text when both alt and title are empty', async () => { diff --git a/tests/engine/ImportExecutionEngine.e2e.test.ts b/tests/engine/ImportExecutionEngine.e2e.test.ts index 9fc4ee4..47408ce 100644 --- a/tests/engine/ImportExecutionEngine.e2e.test.ts +++ b/tests/engine/ImportExecutionEngine.e2e.test.ts @@ -440,13 +440,14 @@ describe('ImportExecutionEngine E2E Tests', () => { // Linked image with empty alt should become a plain image with filename-derived alt // The link target is the full-size image, so use that for the image src - expect(content).toContain('![full-size.png](http://example.com/wp-content/uploads/2020/03/full-size.png)'); + // Note: extension is stripped from alt text for cleaner output + expect(content).toContain('![full-size](http://example.com/wp-content/uploads/2020/03/full-size.png)'); // Linked image with no alt attribute (link and image different) - expect(content).toContain('![photo.jpg](http://example.com/gallery/photo.jpg)'); + expect(content).toContain('![photo](http://example.com/gallery/photo.jpg)'); // Linked image where link and src are the same - expect(content).toContain('![photo.jpg](http://example.com/photo.jpg)'); + expect(content).toContain('![photo](http://example.com/photo.jpg)'); // Image with proper alt inside link should preserve the alt text expect(content).toContain('![Company Logo](http://example.com/logo.png)');