Skip to content

Commit 3c2723a

Browse files
Patch shiki core
1 parent dc528fb commit 3c2723a

File tree

4 files changed

+63
-42
lines changed

4 files changed

+63
-42
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252
"pnpm": {
5353
"patchedDependencies": {
54+
"@shikijs/core": "patches/@shikijs__core.patch",
5455
"@types/[email protected]": "patches/@[email protected]",
5556
5657
}

packages/cursorless-org-docs/src/docs/components/calculateHighlights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function calculateHighlights(
5656
]);
5757
}
5858

59-
function flattenHighlights(highlights: Highlight[]) {
59+
function flattenHighlights(highlights: Highlight[]): Highlight[] {
6060
const positions = getUniquePositions(highlights);
6161
const results: Highlight[] = [];
6262

patches/@shikijs__core.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/dist/index.mjs b/dist/index.mjs
2+
index 5ba9a077425954c8099a26820a3411b017093b0d..28a0d61a7c36c4f796f66fe0ada874b264bc5930 100644
3+
--- a/dist/index.mjs
4+
+++ b/dist/index.mjs
5+
@@ -441,10 +441,10 @@ function verifyIntersections(items) {
6+
throw new ShikiError$1(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);
7+
for (let j = i + 1; j < items.length; j++) {
8+
const bar = items[j];
9+
- const isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;
10+
+ const isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset <= foo.end.offset;
11+
const isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;
12+
const isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;
13+
- const isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;
14+
+ const isBarHasFooEnd = bar.start.offset <= foo.end.offset && foo.end.offset <= bar.end.offset;
15+
if (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {
16+
if (isFooHasBarStart && isFooHasBarEnd)
17+
continue;

pnpm-lock.yaml

Lines changed: 44 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)