Skip to content

Feature: Add colon to allowed separators for the AutoLinkPlugin #8189

@bmakan

Description

@bmakan

Description

AutolinkPlugin has a hard-coded list of valid separators acceptable at the end of the matched string.

const PUNCTUATION_OR_SPACE = /[.,;\s]/;

With custom matchers which link certain tags into urls (e.g., GH-12345 -> https://github.com/facebook/lexical/issues/12345 ) it's not possible to write something like this:

GH-12345:
* Investigated the issue...

This is common style of writing weekly reports - "in issue I did the following..." - followed by an unordered list.

Use Cases

GH-12345:

  • investigated ...
  • resolved ...

JIRA-12345:

  • addressed ...

My proposal is to extend this allowlist with a colon (:) or allow the list to be modified by the developers via AutoLinkPlugin property.

Impact

Hundreds of engineers in our company write weekly reports and this is a fairly common syntax to describe what was done in various issues, features, etc. We have several tags defined to reference various external tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement over existing featurehyperlinksRelates to Lexical Links

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions