Skip to content

Pass regex match as prop to annotations #434

Open

Description

@C-Loftus

Thank you for your work on codehike. Just tried out v1 and it is great with Docusaurus.

I am running into an issue with link annotations. https://codehike.org/docs/code/link mentions we can use regexes for links. However, the links that match end up linking to the same page. This occurs on the example in the docs.

I wasn't sure if there is additional syntax but could not find it elsewhere. Happy to submit a PR to the docs if this is something I am missing.

Here I hover over the github link but the link shows it linking to the same site

image

Reproduced this myself locally as well.
image

Activity

  1. pomber commented on Aug 29, 2024

    @pomber
    Contributor

    You are right, thanks.

    There's a feature missing where the regex match is passed to the annotation, in the case of links the match then becomes the href. I have that on my todo list.

  2. changed the title [-]Regexs links link to the same page, not the link it matches[/-] [+]Pass regex match as prop to annotations[/+] on May 1, 2025
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions