markdown-it / markdown-it/linkify-it
Email links followed by a hyphen are not detected
Open
Beginner friendly
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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