Skip to content

Commit

Permalink
enhance: bump sugar-high to remove props hack
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jan 25, 2025
1 parent f037e6d commit 8058c22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"packageManager": "[email protected]",
"dependencies": {
"sugar-high": "^0.8.2"
"sugar-high": "^0.8.3"
}
}
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/code/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Token
data-sh-token-type={type}
key={childIndex}
className={properties.className}
// TODO: improve the properties of the token
style={{ color: properties.style.replace('color: ', '') }}
{...properties}
>
{(children[0].value)}
</Token>
Expand Down

0 comments on commit 8058c22

Please sign in to comment.