sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`bug #1234` sometimes creates a link, sometimes doesn't #3285

timotheecour posted onGitHub

in https://github.com/nim-lang/Nim/pull/14796/files bug #1235 (or issue #1235) does not create a link to the corresponding github issue;

image

in other cases it does: https://github.com/nim-lang/Nim/pull/14795/files

image

How do we make it always work?


This is because of https://github.com/sindresorhus/refined-github/blob/master/source/features/linkify-code.tsx#L26-L28, only issue references that are inside "code comments" are linkified.

In this case, GitHub doesn't highlight rst diffs enough for us to tell if it is a comment we have to process or part of code that should be ignored.

@fregante, maybe we should also linkify issue references that are outside of comments. Is something stopping us from doing that?

posted by notlmn almost 5 years ago

I don’t think so. That’s a comment so our logic is correct: GitHub issues appear in comments.

This is more about GitHub not recognizing its a comment.

We don’t linkify issues numbers everywhere to avoid unnecessary processing since GitHub issues appear in comments.

posted by fregante almost 5 years ago

can we have the option to linkify everywhere? at very least in diffed text? that's the whole reason I'd want to use this

posted by timotheecour almost 5 years ago

that's the whole reason I'd want to use this

This feature is to linkify issue references inside code comments, where we can say if a particular part of code is a comment.

In this particular case where you have a nim code block inside an rst file, GitHub doesn't process that code block. This seems to also happen in md files too (example).

By your own example it does work inside regular nim file diffs, as you expect it to.

posted by notlmn almost 5 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests