Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eight-readers-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"codehike": patch
---

Add `color-scheme` to `highlight` result
2 changes: 1 addition & 1 deletion packages/codehike/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"check-exports": "attw --pack ."
},
"dependencies": {
"@code-hike/lighter": "1.0.0",
"@code-hike/lighter": "1.0.1",
"diff": "^5.1.0",
"estree-util-visit": "^2.0.0",
"mdast-util-mdx-jsx": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
}}
/>
Expand Down Expand Up @@ -59,6 +60,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
}}
/>
Expand Down Expand Up @@ -95,6 +97,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
}}
/>
Expand Down Expand Up @@ -122,6 +125,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
}}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand All @@ -8,7 +8,7 @@
</p>
<p>
hello
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #c9d1d9">&lt;</span>
<span style="color: #7ee787">div</span>
<span style="color: #79c0ff">class</span>
Expand All @@ -22,7 +22,7 @@
</p>
<p>
two lines
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand All @@ -35,7 +35,7 @@
</p>
<p>
extra meta
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand Down
8 changes: 4 additions & 4 deletions packages/codehike/tests/md-suite/inline-code.9.rendered.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand All @@ -8,7 +8,7 @@
</p>
<p>
hello
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #c9d1d9">&lt;</span>
<span style="color: #7ee787">div</span>
<span style="color: #79c0ff">class</span>
Expand All @@ -22,7 +22,7 @@
</p>
<p>
two lines
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand All @@ -35,7 +35,7 @@
</p>
<p>
extra meta
<code style="color: #c9d1d9; background: #0d1117">
<code style="color: #c9d1d9; background: #0d1117; color-scheme: dark">
<span style="color: #ff7b72">var</span>
<span style="color: #c9d1d9">x</span>
<span style="color: #ff7b72">=</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
}}
/>
Expand Down Expand Up @@ -70,6 +71,7 @@ function _createMdxContent(props) {
style: {
color: "#c9d1d9",
background: "#0d1117",
colorScheme: "dark",
},
},
}
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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