question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ghMentions does not work with username having dots

See original GitHub issue

Description

In GitLab, dots are allowed in usernames (unlike in GitHub). When using ghMentions with ghMentionsLink, if the given username contains a dot, the link is made only with what is before the dot.

Input

@john.doe

With the following showdown options:

{
    ghMentions: true,
    ghMentionsLink: 'https://gitlab.example.com/{u}',
}

Expected output

<a href="https://gitlab.example.com/john.doe>@john.doe</a>

Actual output

<a href="https://gitlab.example.com/john>@john</a>.doe

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
davidsandozcommented, Sep 17, 2018

Done 😉

1reaction
tiviecommented, Sep 14, 2018

I will make showdown allow dashes, underscores and dots in the middle of the username, since that seems a valid usecase scenario

Read more comments on GitHub >

github_iconTop Results From Across the Web

mention does not work, but [~username] works in custom field
Solved: Our users like to use '@mentions a lot, but @ notation does not work in all custom fields. Custom fields user Wiki...
Read more >
Why do Twitter users put a dot before mentions? - Quora
It will then only be sent to that profile's feed. By putting a dot, you break that algorithm through ensuring the text does...
Read more >
Update a regex that matches twitter like mentions to allow for ...
One or more dots are allowed in a username. · The username must not start or end with a dot. · No two...
Read more >
Pages will not work with usernames, groups or projects that ...
Pages will not work with usernames, groups or projects that end in a -, contain dots, or are otherwise not valid domain labels....
Read more >
Issues for Mentions | Drupal.org
Title Status Priority Category Not working with Drupal 8.9 Closed (cannot reproduce) Normal Bug report Add composer.json Closed (fixed) Normal Bug report How to deal with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found