Skip to content

Unable to use target="_blank" for anchor tags #2252

@martinezdylan

Description

@martinezdylan

Bug description

It seems the GitBook renderer ignores the target attribute in anchor tags. Could we have this added? There are some "external links" where it makes sense for it to open a new tab instead of having to navigate back and reload the page again.

How to reproduce

  1. Create a link via <a href="https://google.com" target="_blank">Google</a> in any .md file in your repo rendered by GitHub
  2. Attempt to click the link in the published endpoint, the link will open in the same tab. Viewing the DOM, it looks like it gets translated & target attribute just isn't carried over.

Additional context

N/A

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