Properly parse at-commands with narrow non-breaking spaces (#18677)

This commit is contained in:
Tommaso Sciortino
2026-02-09 16:51:24 -08:00
committed by GitHub
parent cc2798018b
commit eb94284256
4 changed files with 76 additions and 54 deletions
@@ -134,6 +134,14 @@ describe('parseInputForHighlighting', () => {
{ text: '@/my\\ path/file.txt', type: 'file' },
]);
});
it('should highlight a file path with narrow non-breaking spaces (NNBSP)', () => {
const text = 'cat @/my\u202Fpath/file.txt';
expect(parseInputForHighlighting(text, 0)).toEqual([
{ text: 'cat ', type: 'default' },
{ text: '@/my\u202Fpath/file.txt', type: 'file' },
]);
});
});
describe('parseInputForHighlighting with Transformations', () => {