Skip to content

Commit

Permalink
feat: shiki add line number, fixes #309
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Mar 15, 2024
1 parent 1c9aba2 commit e76df6f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
17 changes: 17 additions & 0 deletions src/components/ui/code-highlighter/shiki/Shiki.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@
@apply flex flex-col;
}

code {
counter-reset: step;
counter-increment: step 0;
}

code .line::before {
content: counter(step);
counter-increment: step;
width: 1.5rem;
margin: 0 6px;
display: inline-block;
text-align: right;
opacity: 0.3;
padding-right: 6px;
/* border-right: 1px solid currentColor; */
}

.shiki,
code {
@apply !bg-transparent;
Expand Down
3 changes: 0 additions & 3 deletions src/components/ui/modal/stacked/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ export interface ModalProps {

max?: boolean

////
sheetFullScreen?: boolean | 'half'

wrapper?: FC
}

0 comments on commit e76df6f

Please sign in to comment.