diff --git a/src/lib/utils/bulletListTypes.ts b/src/lib/utils/bulletListTypes.ts index 3d8c6f0..a35ed38 100644 --- a/src/lib/utils/bulletListTypes.ts +++ b/src/lib/utils/bulletListTypes.ts @@ -72,8 +72,6 @@ function mapSymbolChar(char: string, font: string | null | undefined): string | return map[code & 0xff] ?? null; } if (isPua) return null; - // Word's classic hollow bullet is a Courier New "o" — render it as a real circle. - if (char === 'o' && (font ?? '').toLowerCase().startsWith('courier')) return '◦'; return char; } diff --git a/tests/docx-roundtrip.test.ts b/tests/docx-roundtrip.test.ts index 584db55..4d14761 100644 --- a/tests/docx-roundtrip.test.ts +++ b/tests/docx-roundtrip.test.ts @@ -545,7 +545,7 @@ describe('DOCX import of a foreign Word document', () => { expect(top.attrs?.bulletChar).toBe('❖'); // Wingdings U+F076 const nested = walk(top, 'bulletList').find((b) => b !== top)!; expect(walk(nested, 'text')[0].text).toBe('Courier hollow'); - expect(nested.attrs?.bulletChar ?? null).toBe(null); // Courier 'o' = default ◦ at level 2 + expect(nested.attrs?.bulletChar).toBe('o'); // Word's hollow bullet is the letter, as LO draws it }); it("imports Word's legal numbering (%1.%2.) as a multilevel list", () => { diff --git a/tests/unit/bullet-list-types.test.ts b/tests/unit/bullet-list-types.test.ts index 984c01a..89b765d 100644 --- a/tests/unit/bullet-list-types.test.ts +++ b/tests/unit/bullet-list-types.test.ts @@ -53,8 +53,9 @@ describe('bulletCharFromDocx (Word numbering.xml patterns)', () => { expect(bulletCharFromDocx('v', 'Wingdings')).toBe('❖'); }); - it("maps Courier New 'o' (Word's hollow bullet) to ◦", () => { - expect(bulletCharFromDocx('o', 'Courier New')).toBe('◦'); + it("keeps Word's hollow bullet the letter it is", () => { + // A Courier New "o" — LibreOffice and Word both draw the glyph, not a ring. + expect(bulletCharFromDocx('o', 'Courier New')).toBe('o'); }); it('passes literal chars in text fonts through', () => {