Skip to content

Commit

Permalink
refactor(front_matter): prepare for noUncheckedIndexedAccess (#4158)
Browse files Browse the repository at this point in the history
  • Loading branch information
syhol authored Jan 10, 2024
1 parent aec0327 commit d47a7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front_matter/create_extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function recognize(str: string, formats?: Format[]): Format {
formats = Object.keys(MAP_FORMAT_TO_RECOGNIZER_RX) as Format[];
}

const [firstLine] = str.split(/(\r?\n)/);
const [firstLine] = str.split(/(\r?\n)/) as [string];

for (const format of formats) {
if (format === "unknown") {
Expand Down

0 comments on commit d47a7f2

Please sign in to comment.