Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 22, 2024
1 parent ec83ba2 commit be268f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/react-dom": "^18.0.0",
"@wooorm/starry-night": "^3.0.0",
"cssnano": "^7.0.0",
"esbuild": "^0.23.0",
"esbuild": "^0.24.0",
"eslint-config-xo-react": "^0.27.0",
"hast-util-to-jsx-runtime": "^2.0.0",
"postcss-cli": "^11.0.0",
Expand Down
23 changes: 10 additions & 13 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ function Playground() {
JSON.stringify(ast, undefined, 2),
'source.json'
),
// @ts-expect-error: to do: fix in `hast-util-to-jsx-runtime`.
{Fragment, jsx, jsxs}
)}
</code>
Expand All @@ -276,7 +275,6 @@ function Playground() {
result,
outputFormatHtml ? 'text.html.basic' : 'text.md'
),
// @ts-expect-error: to do: fix in `hast-util-to-jsx-runtime`.
{Fragment, jsx, jsxs}
)}
</code>
Expand Down Expand Up @@ -430,11 +428,11 @@ function Playground() {
<div className="playground-cell playground-input-area">
<div className="playground-input-area-group">
<div className="playground-input-area-draw">
{toJsxRuntime(
starryNight.highlight(value, 'text.md'),
// @ts-expect-error: to do: fix in `hast-util-to-jsx-runtime`.
{Fragment, jsx, jsxs}
)}
{toJsxRuntime(starryNight.highlight(value, 'text.md'), {
Fragment,
jsx,
jsxs
})}
{/* Trailing whitespace in a `textarea` is shown, but not in a `div`
with `white-space: pre-wrap`.
Add a `br` to make the last newline explicit. */}
Expand Down Expand Up @@ -723,7 +721,6 @@ function Playground() {
'npm install --save ' + names.toSorted().join(' '),
'source.shell'
),
// @ts-expect-error: to do: fix in `hast-util-to-jsx-runtime`.
{Fragment, jsx, jsxs}
)}
</code>
Expand All @@ -733,11 +730,11 @@ function Playground() {
</p>
<pre className="language-js">
<code>
{toJsxRuntime(
starryNight.highlight(code, 'source.js'),
// @ts-expect-error: to do: fix in `hast-util-to-jsx-runtime`.
{Fragment, jsx, jsxs}
)}
{toJsxRuntime(starryNight.highlight(code, 'source.js'), {
Fragment,
jsx,
jsxs
})}
</code>
</pre>
<p>…you‘d get the above output as shown in the playground.</p>
Expand Down

0 comments on commit be268f6

Please sign in to comment.