Skip to content

Commit

Permalink
perf: style
Browse files Browse the repository at this point in the history
  • Loading branch information
1943time committed Dec 16, 2023
1 parent ac29277 commit 859975e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/renderer/src/editor/plugins/useHighlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ export function useHighlight(store?: EditorStore) {
},
color: '#a3a3a3'
})
} else if (/^\|([^|]+\|)+$/.test(str)){
ranges.push({
anchor: {
path: [...path, 0],
offset: 0
},
focus: {
path: [...path, 0],
offset: str.length
},
color: '#a3a3a3'
})
}
}
return ranges
Expand Down

0 comments on commit 859975e

Please sign in to comment.