Skip to content

linkTarget in docs doesn't run for all links #2

Description

@andyfleming

Steps to reproduce:

  1. Open the app ui
  2. Go to the changelog in the docs section
  3. Observe that some links are modified to have target="blank" like <a target="_blank" href="https://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>, but some aren't like <a href="https://github.com/andyfleming/jetpax/compare/v0.2.1...v0.3.0">0.3.0</a>.

Additional Notes

This might be caused by the footnote style of links.

Existing logic in Doc.tsx:

<ReactMarkdown
    source={markdown}
    escapeHtml={false}
    linkTarget={(url) => {
        return (url.startsWith('/')) ? '' : '_blank'
    }}
/>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions