1

Is there a way we can embed hyperlink into the comment section of a (github) markdown file?

Example usage:

<!-- Please read the code of conduct before submitting, [code_of_conduct](https://link.to.code_of_conduct) -->
Nkk
  • 53
  • 1
  • 5
  • What effect would embedding a link in a comment have since the comment doesn't render? – Nick Bailey Mar 14 '22 at 03:25
  • e.g. when you are editing a pull request and there are commented code of conduct link that if possible you can directly click on it instead of copy/paste. Plus, you can put relative path instead of absolute path and let the parser figure it out so you are better future-proof for changes. Overall, I think there are many use cases once you introduce comments into markdowns as now they do convey information to the client users even if not rendered. – Nkk Mar 14 '22 at 04:59

2 Answers2

0

After testing various comment markdown syntaxes, using GitHub web editor, none of them are rendered as "clickable links"

For instance, [ https://google.com ]::, when editable, is still rendered as text, to be copy-pasted if you need to access its URL.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Hey you need to put a break before the command. I just had the same issue and this works for me on Github.

Random text "enter"

"[code_of_conduct]""(https://link.to.code_of_conduct)" "enter" Random text

hetot he
  • 13
  • 2