Skip to content

Headers with html generate wrong slugs and do not work on Sidebar #645

Closed
@posva

Description

@posva

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 enough

Version

0.11

Steps to reproduce

  • Create a title
## `<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

  • Your OS: os x
  • Node.js version: 10
  • Browser version: latest Chrome
  • Is this a global or local install? local
  • Which package manager did you use for the install? yarn

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions