File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,6 +150,16 @@ function handleClick(event: MouseEvent) {
150150 @apply inline i-carbon :launch rtl-flip ms-1 opacity-50;
151151}
152152
153+ .readme :deep(a [href ^= ' #' ]::after ) {
154+ /* I don't know what kind of sorcery this is, but it ensures this icon can't wrap to a new line on its own. */
155+ content : ' __' ;
156+ @apply inline i-carbon :link rtl-flip ms-1 opacity-0;
157+ }
158+
159+ .readme :deep(a [href ^= ' #' ]:hover ::after ) {
160+ @apply opacity- 100;
161+ }
162+
153163.readme :deep(code ) {
154164 @apply font-mono ;
155165 font-size : 0.875em ;
Original file line number Diff line number Diff line change @@ -377,7 +377,8 @@ export async function renderReadmeHtml(
377377 toc . push ( { text : plainText , id, depth } )
378378 }
379379
380- return `<h${ semanticLevel } id="${ id } " data-level="${ depth } ">${ text } </h${ semanticLevel } >\n`
380+ /** The link href uses the unique slug WITHOUT the 'user-content-' prefix, because that will later be added for all links. */
381+ return `<h${ semanticLevel } id="${ id } " data-level="${ depth } "><a href="#${ uniqueSlug } ">${ text } </a></h${ semanticLevel } >\n`
381382 }
382383
383384 // Syntax highlighting for code blocks (uses shared highlighter)
You can’t perform that action at this time.
0 commit comments