Skip to content

Commit

Permalink
[docs-infra] Fix link in header regression
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 20, 2024
1 parent a1fe722 commit ab9a722
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/pages/experiments/docs/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.

## [Header with link](/)

## Header with Pro plan [<span class="plan-pro"></span>](/x/introduction/licensing/#pro-plan 'Pro plan')

## Header with Premium plan [<span class="plan-premium"></span>](/x/introduction/licensing/#premium-plan 'premium plan')
4 changes: 2 additions & 2 deletions packages/markdown/parseMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ function createRender(context) {
headingHtml.includes('<a ')
? [
// Avoid breaking the anchor link button
`<h${level} id="${hash}"><a href="#${hash}" class="title-link-to-anchor">${headingHtml}</a>`,
`<a href="#${hash}" class="title-link-to-anchor"><span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a>`,
`<h${level} id="${hash}">${headingHtml}`,
`<a href="#${hash}" class="title-link-to-anchor" aria-labelledby="${hash}"><span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a>`,
].join('')
: `<h${level} id="${hash}"><a href="#${hash}" class="title-link-to-anchor">${headingHtml}<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a>`,
`<button title="Post a comment" class="comment-link" data-feedback-hash="${hash}">`,
Expand Down

0 comments on commit ab9a722

Please sign in to comment.