[GH-ISSUE #1140] MD034: Email autolink with incomplete domain in angle brackets incorrectly reported as a violation #2472

Closed
opened 2026-03-07 20:08:04 +03:00 by kerem · 2 comments
Owner

Originally created by @ghost on GitHub (Feb 26, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1140

Similar to: https://github.com/igorshubovych/markdownlint-cli/issues/339

When running the markdownlint-cli2 Pre-commit hook with the --fix option, a pair of angled brackets is added around text that is detected as a URL infinitely.

Minimal Markdown Example:

# Foo

Bar compose@.service

Expected behavior:

Run N:

# Foo

Bar compose@.service

Actual behavior:

Run 1:

# Foo

Bar <compose@.service>

Run 2:

# Foo

Bar <<compose@.service>>

Run 3:

# Foo

Bar <<<compose@.service>>>

et c.

Originally created by @ghost on GitHub (Feb 26, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1140 Similar to: https://github.com/igorshubovych/markdownlint-cli/issues/339 When running the `markdownlint-cli2` Pre-commit hook with the `--fix` option, a pair of angled brackets is added around text that is detected as a URL infinitely. ## Minimal Markdown Example: ```markdown # Foo Bar compose@.service ``` ## Expected behavior: Run `N`: ```markdown # Foo Bar compose@.service ``` ## Actual behavior: Run 1: ```markdown # Foo Bar <compose@.service> ``` Run 2: ```markdown # Foo Bar <<compose@.service>> ``` Run 3: ```markdown # Foo Bar <<<compose@.service>>> ``` et c.
kerem 2026-03-07 20:08:04 +03:00
Author
Owner

@DavidAnson commented on GitHub (Feb 27, 2024):

OK: <user@example.com>

Bad: <user@.com>
<!-- gh-comment-id:1965560937 --> @DavidAnson commented on GitHub (Feb 27, 2024): ```markdown OK: <user@example.com> Bad: <user@.com> ```
Author
Owner

@ghost commented on GitHub (Feb 27, 2024):

OK: <user@example.com>

Bad: <user@.com>

Thanks for the quick reply on this! I should have clarified this in the OP, but the compose@.service is a reference to a Systemd unit template file rather than an email as described here in a few places

<!-- gh-comment-id:1965573964 --> @ghost commented on GitHub (Feb 27, 2024): > ``` > OK: <user@example.com> > > Bad: <user@.com> > ``` Thanks for the quick reply on this! I should have clarified this in the OP, but the `compose@.service` is a reference to a Systemd unit template file rather than an email as described [here](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Description) in a few places
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2472
No description provided.