Closed mdjermanovic closed 6 days ago
The processor doesn't account for BOM, which would be passed in by ESLint if the file has it.
This causes incorrect adjustments of locations and fix ranges.
Repro: https://github.com/mdjermanovic/eslint-markdown-bom
In the above repro, space-in-parens rule fixes ( a) to ( ) instead of (a).
space-in-parens
( a)
( )
(a)
This PR updates preprocess() to remove BOM from the text it operates on.
preprocess()
The processor doesn't account for BOM, which would be passed in by ESLint if the file has it.
This causes incorrect adjustments of locations and fix ranges.
Repro: https://github.com/mdjermanovic/eslint-markdown-bom
In the above repro,
space-in-parens
rule fixes( a)
to( )
instead of(a)
.This PR updates
preprocess()
to remove BOM from the text it operates on.