Skip to content

Commit

Permalink
Merge pull request #164 from Misaka-L/main
Browse files Browse the repository at this point in the history
fix: crash when content contains a period connected with a quotation …
  • Loading branch information
Jinjiang authored Feb 4, 2025
2 parents f2ba038 + c4aa544 commit c2f791d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/case-abbrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const matchAbbr = (
// get the next matching abbr chars by removing the last char and filtering
const matchedAbbrChars = reversedAbbrChars
.filter(
(abbr) => abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
(abbr) => tokenBefore.value && abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
)
.map((abbr) => abbr.slice(1))

Expand Down

0 comments on commit c2f791d

Please sign in to comment.