mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Remove UTF-8 byte order marker from file/string input.
This commit is contained in:
parent
dcf0462c22
commit
f077e4c393
4 changed files with 12 additions and 1 deletions
|
@ -83,6 +83,10 @@ function uniqueFilterForSortedErrors(value, index, array) {
|
|||
|
||||
// Lints a single string
|
||||
function lintContent(content, config, frontMatter, resultVersion) {
|
||||
// Remove UTF-8 byte order marker (if present)
|
||||
if (content.charCodeAt(0) === 0xfeff) {
|
||||
content = content.slice(1);
|
||||
}
|
||||
// Remove front matter (if present at beginning of content)
|
||||
var frontMatterLines = 0;
|
||||
if (frontMatter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue