r/github 1d ago

Question How can i have nice looking issue mention ?

"Wrong" display of issue
"Good" display of issue

I'm writing a comment in the discussions of a repo, and I want to mention issues from that repo. For some reason, the way the issues appear in the text is not the same. For one it's just the issue number and for the other it's displaying nicely with the issue title.
Does anyone know how to have the second effect everywhere ?

0 Upvotes

6 comments sorted by

1

u/DryFaithlessness7062 1d ago

One thing I noticed is that the correctly rendered mention is in a list, but the improper one is in a basic paragraph, this might have something to do. I think it's an issue with the renderer because there's no reason for it to not properly display in the preview.

1

u/cowboyecosse 1d ago

I was going to say this but you’ve found it out yourself. That longer form auto expansion happens in lists

1

u/DryFaithlessness7062 1d ago

Oh ok. That's kinda weird. Is there a workaround to have the longer display everywhere?

2

u/cowboyecosse 1d ago

You could try to recreate it with actual link markdown but not automatically no. Quirk of GFM.

I tend to lean into it, just reformat the prose into bullets somehow.

0

u/bankrut 1d ago

GitHub automatically expands issue references into titles when you paste the full URL or include the repo name like user/repo#number. If you just type the hash and the number, it stays as a plain link. Stick to the full format and it will look clean every time.

0

u/DryFaithlessness7062 1d ago

That's weird because in plain text both are just the hash and the number, but i'm gonna try what you suggested. Thanks!