markdown-it / markdown-it/linkify-it

Email links followed by a hyphen are not detected

Open Beginner friendly
#93 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
739
Forks
72
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the fixture-based tests around test/fixtures/lines.txt and the behavior of linkify.test for email addresses. Add the two reported cases from the issue, then run the relevant test suite. Done means both name@example.com- and name@example.com are detected as valid links.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.