Skip to content

Commit a40f4f1

Browse files
committed
fix: heading anchor
Signed-off-by: Innei <[email protected]>
1 parent c4f80a3 commit a40f4f1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/remark/index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,21 @@ export const parseMarkdown = (markdownText: string): ParserResult => {
3232
// })
3333
.use(rehypeAutolinkHeadings, {
3434
properties: {
35-
className: ['springtide-anchor'],
35+
className: [
36+
'springtide-anchor opacity-0 hover:opacity-100 transition-opacity duration-200 ease-in-out text-sm relative -bottom-2',
37+
],
3638
ariaHidden: true,
3739
tabIndex: -1,
3840
},
39-
content(node) {
41+
content() {
4042
return [
4143
{
4244
type: 'element',
4345
tagName: 'span',
4446
properties: {
45-
className: ['icon-[mingcute--link-line]'],
47+
className: [
48+
'icon-[mingcute--link-line] -translate-x-full absolute -left-2 ',
49+
],
4650
},
4751
children: [],
4852
},

0 commit comments

Comments
 (0)