Skip to content

Commit

Permalink
fix: remove option work wrong in some language
Browse files Browse the repository at this point in the history
  • Loading branch information
enpitsuLin committed Aug 10, 2022
1 parent 1992e55 commit 647c438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const rehypePrismDiff: Plugin<[Options?], Element> = (
line.children.forEach((item) => {
if (item.type !== 'text') return
const itemString = toString(item)
if (itemString.match(/\+|-|!|#/)) fromString(line, itemString.substring(1))
if (itemString.match(/^\+|-|!|#/)) fromString(item, itemString.substring(1))
})
}
}
Expand Down

0 comments on commit 647c438

Please sign in to comment.