Skip to content

Commit c2f791d

Browse files
authored
Merge pull request #164 from Misaka-L/main
fix: crash when content contains a period connected with a quotation …
2 parents f2ba038 + c4aa544 commit c2f791d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/case-abbrs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const matchAbbr = (
4949
// get the next matching abbr chars by removing the last char and filtering
5050
const matchedAbbrChars = reversedAbbrChars
5151
.filter(
52-
(abbr) => abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
52+
(abbr) => tokenBefore.value && abbr[0].toLowerCase() === tokenBefore.value.toLowerCase()
5353
)
5454
.map((abbr) => abbr.slice(1))
5555

0 commit comments

Comments
 (0)