-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headers with html generate wrong slugs and do not work on Sidebar #645
Comments
Thanks, it's a long story, and there are two issues. 1. Unexpected slug at contentSince we want to support headers badge in headers (#540), it makes us be able to write HTML(Vue) tags at the end of the header, with built-in Badge component, it’s will be very convenient for us to add some status for some API.
## Import Code Snippets <Badge text="beta" type="warn"/> <Badge text="0.10.1+" type="tip"/>
But 2. Unexpected slug at sidebar.Sidebar's slugs used |
<!-- Please make sure to read the Pull Request Guidelines: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines --> - For: vuejs/vuepress#645, - Preview: https://deploy-preview-2296--vue-router.netlify.com/
<!-- Please make sure to read the Pull Request Guidelines: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines --> - For: vuejs/vuepress#645, - Preview: https://deploy-preview-2296--vue-router.netlify.com/
<!-- Please make sure to read the Pull Request Guidelines: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines --> - For: vuejs/vuepress#645, - Preview: https://deploy-preview-2296--vue-router.netlify.com/
<!-- Please make sure to read the Pull Request Guidelines: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines --> - For: vuejs/vuepress#645, - Preview: https://deploy-preview-2296--vue-router.netlify.com/
<!-- Please make sure to read the Pull Request Guidelines: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines --> - For: vuejs/vuepress#645, - Preview: https://deploy-preview-2296--vue-router.netlify.com/
Bug report
This is something we use in vue-router docs, in the API Reference. The very first title has an incorrect link
#
, and the title on the Sidebar has an incorrect text/api/#router-link
.I gave this a shot but couldn't completely fix it. The function
deeplyParseHeaders
removes any html from titles, transforming<router-link>
into an empty string. For the slug, I didn't dig enoughVersion
0.11
Steps to reproduce
## `<text>`
What is expected?
Title to be
<text>
and link to be#text
What is actually happening?
Title is an empty string and the link is invalid in the rendered header but not in the sidebar
Other relevant information
The text was updated successfully, but these errors were encountered: