Skip to content

Email links followed by a hyphen are not detected #93

@mbroshi

Description

@mbroshi

When there is a valid email address, such as name@example.com, if it is followed by a hyphen, linkify.test returns false:

console.log(linkify.test('name@example.com'));   // true
console.log(linkify.test('name@example.com,'));  // true
console.log(linkify.test('name@example.com-'));  // false

I would expect both to be true.

You can test this by adding these two lines to test/fixtures/lines.txt:

name@example.com-
name@example.com

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