Skip to content

Commit 163f643

Browse files
committed
feat(plugin-catalog): improve anchor rendering
1 parent 605857a commit 163f643

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

plugins/features/plugin-catalog/src/client/components/Catalog.ts

+9-17
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,11 @@ export default defineComponent({
248248
],
249249
},
250250
[
251-
h(
252-
'a',
253-
{
254-
'href': `#${title}`,
255-
'class': 'vp-catalog-header-anchor',
256-
'aria-hidden': true,
257-
},
258-
'#',
259-
),
251+
h('a', {
252+
'href': `#${title}`,
253+
'class': 'vp-catalog-header-anchor',
254+
'aria-hidden': true,
255+
}),
260256
childLink,
261257
],
262258
),
@@ -278,14 +274,10 @@ export default defineComponent({
278274
],
279275
},
280276
[
281-
h(
282-
'a',
283-
{
284-
href: `#${title}`,
285-
class: 'vp-catalog-header-anchor',
286-
},
287-
'#',
288-
),
277+
h('a', {
278+
href: `#${title}`,
279+
class: 'vp-catalog-header-anchor',
280+
}),
289281
h(
290282
RouteLink,
291283
{

plugins/features/plugin-catalog/src/client/styles/catalog.scss

+4
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@
190190
display: none;
191191
}
192192

193+
&::before {
194+
content: '';
195+
}
196+
193197
[dir='rtl'] & {
194198
float: right;
195199
margin-right: -1em;

0 commit comments

Comments
 (0)