From 8058c222c3cd086fdcfc8da16f3d8cb6a4245948 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Sat, 25 Jan 2025 20:57:22 +0100 Subject: [PATCH] enhance: bump sugar-high to remove props hack --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ src/code/code.tsx | 7 +++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 15194c9..12b30eb 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,6 @@ }, "packageManager": "pnpm@9.15.4", "dependencies": { - "sugar-high": "^0.8.2" + "sugar-high": "^0.8.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b84c912..c52f5d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^17.0.0 || ^18.0.0 || ^19.0.0 version: 19.0.0 sugar-high: - specifier: ^0.8.2 - version: 0.8.2 + specifier: ^0.8.3 + version: 0.8.3 devDependencies: '@types/react': specifier: ^19.0.7 @@ -50,7 +50,7 @@ importers: version: 19.0.0(react@19.0.0) sugar-high: specifier: ^0.8.2 - version: 0.8.2 + version: 0.8.3 devDependencies: '@types/node': specifier: 22.10.7 @@ -1191,8 +1191,8 @@ packages: babel-plugin-macros: optional: true - sugar-high@0.8.2: - resolution: {integrity: sha512-u/U1idCsHBMG9p5z88XYdEh9bxU19o5kueS0a3TKBYSFbTqtRqSyVqdbkFNXv/sDc9WYALCFT56EosyA0k1+3Q==} + sugar-high@0.8.3: + resolution: {integrity: sha512-RwewMVg92h7Ezjnhh5lADcimwDjeaWrXwfEdoz1WlKCzHTuz35SDatMOeJ4X7HUmFUd7PI49TXAcnU4KDoX+8Q==} supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -2270,7 +2270,7 @@ snapshots: client-only: 0.0.1 react: 19.0.0 - sugar-high@0.8.2: {} + sugar-high@0.8.3: {} supports-preserve-symlinks-flag@1.0.0: {} diff --git a/src/code/code.tsx b/src/code/code.tsx index 9b46ebb..a272216 100644 --- a/src/code/code.tsx +++ b/src/code/code.tsx @@ -32,13 +32,12 @@ function generateHighlightedLines( const { tagName: Line, properties: lineProperties } = line const tokens = line.children .map((child, childIndex) => { - const { tagName: Token, children, properties } = child + const { tagName: Token, type, children, properties } = child return ( {(children[0].value)}