# fix\(gitlab\): ignore merge request paths inside a query or fragment · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/6e9591ea8215fd50bfa2199bc660cd460f93a0e2)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 6e9591ea8215fd50bfa2199bc660cd460f93a0e2

Requested commit: 6e9591ea8215fd50bfa2199bc660cd460f93a0e2

Commit: 6e9591ea8215fd50bfa2199bc660cd460f93a0e2

Tree: 0d531feabefd987d046f2b5ef49567423968ee5f

Author: Victor Vogel

Committer: Victor Vogel

## Message

```
fix(gitlab): ignore merge request paths inside a query or fragment

The reference pattern matched any characters before /-/merge_requests/,
so https://gitlab.com/g/p?x=/-/merge_requests/5 and the same URL with a
fragment counted as merge request links even though the path parser
rejects them, and the link dialog resolved them to null. The repository
segment now stops at ? or #, so only a real merge request path matches.
Nested self-hosted paths with a trailing query or fragment still match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [a4c2fe0f81c3fd21b21093861c28a04110ad1840](https://git.cafe/pingdotgg/t3code/commit/a4c2fe0f81c3fd21b21093861c28a04110ad1840?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/6e9591ea8215fd50bfa2199bc660cd460f93a0e2?format=markdown)
