File tree 1 file changed +4
-15
lines changed
1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- import type { Lang } from ' shiki-es '
2
+ import type { BundledLanguage } from ' shiki'
3
3
import { computed } from ' vue'
4
4
import { renderCodeHighlight } from ' ../composables/shiki'
5
5
6
6
const props = withDefaults (
7
7
defineProps <{
8
8
code: string
9
- lang? : Lang
9
+ lang? : BundledLanguage
10
10
lines? : boolean
11
11
transformRendered? : (code : string ) => string
12
12
}>(),
13
13
{
14
- lines: true ,
14
+ lines: false ,
15
15
},
16
16
)
17
17
const rendered = computed (() => {
@@ -29,18 +29,7 @@ const rendered = computed(() => {
29
29
</template >
30
30
31
31
<style >
32
- .n-code-block-lines .shiki code {
33
- counter-reset : step;
34
- counter-increment : step calc (var (--start , 1 ) - 1 );
35
- }
36
32
.n-code-block-lines .shiki code .line ::before {
37
- content : counter (step );
38
- counter-increment : step;
39
- width : 2rem ;
40
- padding-right : 0.5rem ;
41
- margin-right : 0.5rem ;
42
- display : inline-block ;
43
- text-align : right ;
44
- --at-apply : text-truegray:50 ;
33
+ display : none ;
45
34
}
46
35
</style >
You can’t perform that action at this time.
0 commit comments