File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ function Mark({
3030 children : React . ReactNode
3131 theme : any
3232} ) {
33- console . log ( children )
3433 const bg =
35- typeof data === "string"
34+ data && typeof data === "string"
3635 ? data
3736 : tryGuessColor ( children ) ||
3837 transparent (
3938 getColor ( theme , ColorName . CodeForeground ) ,
4039 0.2
4140 )
41+
4242 return (
4343 < span
4444 className = "ch-code-mark-annotation"
Original file line number Diff line number Diff line change 1- # Hello
2-
3- Foo bar <CH.InlineCode >Hello</CH.InlineCode > foo bar
4-
5- ``` js mark=1[1:12],3[17:20]
1+ ``` js lorem.js
2+ // mark[1:8]
63function lorem (ipsum , dolor = 1 ) {
7- const sit = ipsum == null ? 0 : ipsum .sit
8- dolor = sit - amet (dolor)
9- return sit
10- ? consectetur (ipsum, 0 , dolor < 0 ? 0 : dolor)
11- : []
4+ // mark[24:32]
5+ const sit = ipsum == undefined
6+ // mark[8:16]
7+ if (" consectur" ) {
8+ // mark[20:27]
9+ return ipsum + 12345678
10+ }
11+ // mark[3:12]
12+ adipiscing (dolor + amet)
1213}
1314```
You can’t perform that action at this time.
0 commit comments