Handle sphinx cross-references roles in file previews
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
: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.
For restructured text, the preview parser could support
:ref: role by converting them to links to the corresponding file (position) inside the same repository.