Skip to content

[Feature Request] Add configurable "Mentions" extension #3851

@pratibha1304

Description

@pratibha1304

Feature Request

Is your feature request related to a problem? Please describe.
Currently, marked does not natively support GitHub-style mentions (e.g., @user). Users have to write custom regex replacers which can be brittle and often accidentally linkify emails ([email protected]) or mentions inside code blocks.

Describe the solution you'd like
I would like to implement a robust, configurable extension that:

  1. Detects @handle syntax.
  2. Linkifies it to a configurable baseUrl (default: https://github.com/).
  3. Correctly ignores email addresses.
  4. Correctly ignores mentions inside inline code ( ) or code blocks.

Describe alternatives you've considered
Using a post-processing regex on the output HTML, but this is error-prone and can break HTML attributes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions