Handle sphinx cross-references roles in file previews

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

Like the author of #26687, I have some rst files in a gitlab repository that use sphinx-specific roles as documented in http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html and specifically :ref: and :doc: to point to other files in the same repository in a way that is independent of the format used (rst source or the ones generated by sphinx).

It would be nice to be able to follow those links directly in the gitlab previews.

Proposal

For restructured text, the preview parser could support :doc: and :ref: role by converting them to links to the corresponding file (position) inside the same repository.

Edited Aug 25, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading