Markdown monospace malarkey with commit comparison links
Summary
Text linked to commit comparisons are rendered in a monospace (i.e., in-line code) font for no apparent reason. Follows on from GitLab Support request #89707.
Background details
I’m putting together a Changelog.md and noticed a certain discrepency between the way that markdown is rendered when linked to a commit comparison; the same issue also affects tag comparison URLs.
While linked text usually inherits its parent’s/neighbour’s style, links to commit comparisons appear to over-rule this specificity and defaults to a monospace font regardless of its parent/neighbour.
Steps to replicate
- While you can follow the steps below, you can also view the issue in situ on Changelog.md of my public GitLab repo.
- In a
.md
file, enter the following text:
[MON 01] and [MON 02]
[mon 01]: https://gitlab.com/
[mon 02]: https://gitlab.com/rdhar/lab-instance/compare/0.1.0...0.2.0
- View the markdown-rendered file.
What is the current bug behavior?
The above block of text is rendered as follows :
[MON 01] and [MON 02] [mon 01]: https://gitlab.com/ [mon 02]: https://gitlab.com/rdhar/lab-instance/compare/0.1.0...0.2.0
Observe as the 2nd link "MON 02" is rendered in a monospace font, similar to in-line code
. I have a hunch this is because of the 3 consecutive periods present in the URL that's tripping it up… somehow.
What is the expected correct behavior?
Much like any other linked bodies of text, I’d expect commit comparison links would be rendered with the same styling as its parent/neighbour instead of defaulting to a monospace font.
If the compare link is used as a inline-style and reference-style links, then it should not be monospaced.
Ex:
[Compare link](project/compare/13664-branch-name...master)
should render as the system font, not a monospaced font.
Attachment(s)
In the event that this issue does get fixed sometime soon, here's a screenshot for old time's sake evidence.
Output of checks
This bug happens on GitLab.com
Thanks for your time.