`');
});
test('handles uppercase tags and unquoted attributes', () => {
const input = `
`;
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
expect(output).not.toContain('
');
expect(output).toContain('Centered');
});
test('handles single-quoted attributes', () => {
const input = `
Right
`;
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
expect(output).not.toContain('
');
expect(output).toContain('Right');
});
test('removes non-alignment div tags without leaving malformed HTML', () => {
const input = `
Note text
`;
const output = WordTemplateExporter.preprocessMarkdownForWordExport(input);
expect(output).not.toContain('
');
expect(output).toContain('Note text');
});
test('returns non-string input unchanged', () => {
expect(WordTemplateExporter.preprocessMarkdownForWordExport(null)).toBeNull();
expect(WordTemplateExporter.preprocessMarkdownForWordExport(123)).toBe(123);
});
});