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({
30
30
children : React . ReactNode
31
31
theme : any
32
32
} ) {
33
- console . log ( children )
34
33
const bg =
35
- typeof data === "string"
34
+ data && typeof data === "string"
36
35
? data
37
36
: tryGuessColor ( children ) ||
38
37
transparent (
39
38
getColor ( theme , ColorName . CodeForeground ) ,
40
39
0.2
41
40
)
41
+
42
42
return (
43
43
< span
44
44
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]
6
3
function 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)
12
13
}
13
14
```
You can’t perform that action at this time.
0 commit comments