Skip to content

Commit ce0be73

Browse files
committed
Add BOM check
1 parent c0f390e commit ce0be73

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎parser/src/lexer.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ where
236236
lxr.window.slide();
237237
lxr.window.slide();
238238
lxr.window.slide();
239+
// Check if BOM exists
240+
if let Some('\u{feff}') = lxr.window[0] {
241+
lxr.window.slide();
242+
}
239243
// Start at top row (=1) left column (=1)
240244
lxr.location.reset();
241245
lxr

0 commit comments

Comments
 (0)