Skip to content

Commit

Permalink
fix(vscode): avoid duplicated color notation
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 11, 2023
1 parent f1c937d commit ca89194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vscode/src/annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export async function registerAnnotations(

if (colorPreview) {
const color = getColorString(md)
if (color) {
if (color && !colorRanges.find(r => r.range.start.isEqual(doc.positionAt(i[0])))) {
colorRanges.push({
range: new Range(doc.positionAt(i[0]), doc.positionAt(i[1])),
renderOptions: { before: { backgroundColor: color } },
Expand Down

0 comments on commit ca89194

Please sign in to comment.