DEV Community

Discussion on: Links in an inline code don't link

Collapse
 
andy profile image
Andy Zhao (he/him)

Hmm agreed with Ben, I would think if a link is in code it's meant to show you the code and not the hyperlink.

Thread Thread
 
nektro profile image
Meghan (she/her)

This is the effect I was going for. The idea was that I would link a keyword to the documentation but put the keyword in an inline code block to have the monospace font.

Thread Thread
 
ben profile image
Ben Halpern

In the ink it shows this code:

[`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)

Which renders like this:

EventTarget

Which is different from what you wrote, right?

Thread Thread
 
nektro profile image
Meghan (she/her)

slightly, but because i realized the original way didn't properly compile to adding the <code> part, which dev.to does not with with the backticks inside or outside the url

Thread Thread
 
ben profile image
Ben Halpern

Hah whoops I expected that to go differently. I now know what you're talking about.

Thread Thread
 
andy profile image
Andy Zhao (he/him)

Ahh that makes sense. @nektro I think on GitHub it does what you're talking about.