Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable Github-flavored Markdown autolinking

http://example.com

http://<span></span>example.com
@ytechie

This comment has been minimized.

Copy link

@ytechie ytechie commented Nov 25, 2013

THANK YOU. I was searching forever for a way to do this.

@a-v-l

This comment has been minimized.

Copy link

@a-v-l a-v-l commented Jun 27, 2014

Not working anymore… But this will do:
http://example.com

ht<span>tp://</span>example.com
@jrspruitt

This comment has been minimized.

Copy link

@jrspruitt jrspruitt commented Mar 27, 2015

I couldn't get the span to work, but a zero-width space character did the trick. Although this will break the link when copy and pasting.

ht&#8203;tp://example.com
@takanopontaro

This comment has been minimized.

Copy link

@takanopontaro takanopontaro commented Apr 3, 2015

http://github.com
http://www.github.com
http://www.github.com
http://www.github.com

http&#58;//github.com
http&#58;//www.github.com
http&#58;//www\.github.com
http://www\.github.com
@SpiritLevel

This comment has been minimized.

Copy link

@SpiritLevel SpiritLevel commented Nov 22, 2015

This works for me :

http://<i></i>example.com

which gives

http://example.com

instead of

http://example.com

And it involves less, easier typing :)

@edrush

This comment has been minimized.

Copy link

@edrush edrush commented Feb 12, 2016

Do you also know why a text like makedoc.sh renders as a link and how to prevent it? I want to to mention this file in my markdown.

@tashimatoru

This comment has been minimized.

Copy link

@tashimatoru tashimatoru commented Mar 24, 2016

http://github.com
http://aaa.github.com
http://aaa.bbb.github.com

http\://github.com
http\://aaa.github.com
http\://aaa.bbb.github.com
@grmo5

This comment has been minimized.

Copy link

@grmo5 grmo5 commented Jun 1, 2016

I used the punctuation character (&#46;) instead of the '.' and it seems to remove it! www&#46;example&#46;com www.example.com

@mgustavocoder

This comment has been minimized.

Copy link

@mgustavocoder mgustavocoder commented Dec 30, 2016

thanks!

@realprogrammer5000

This comment has been minimized.

Copy link

@realprogrammer5000 realprogrammer5000 commented Jan 11, 2017

Using **s

Get:

Programmer5000.com

By writing:

**Programmer5000**.com

@braksator

This comment has been minimized.

Copy link

@braksator braksator commented Feb 20, 2017

Treat it as code? http://www.example.com

@Shangri-GitHub

This comment has been minimized.

Copy link

@Shangri-GitHub Shangri-GitHub commented Aug 28, 2017

cool

@ruleechen

This comment has been minimized.

Copy link

@ruleechen ruleechen commented Sep 24, 2017

thank you all

@smed79

This comment has been minimized.

Copy link

@smed79 smed79 commented Oct 15, 2017

Thanks for the tip.

Other examples:

http://www.github.com/
http://www.github.com/
http://www.github.com/

http\://www.github.com/
http:\//www.github.com/
http:/\/www.github.com/

@braksator Treat it as code disable the styling.
(For e.g you can not bold a word http://​www.example.com/)

@wraymond

This comment has been minimized.

Copy link

@wraymond wraymond commented Feb 16, 2018

I have a similar issue but with the word "data". When knit, "data" turns into a link. I just want it be to Data:. Below is what I have in my markdown code
**Data:** texttexttexttext

@lukyjuranek

This comment has been minimized.

Copy link

@lukyjuranek lukyjuranek commented May 30, 2018

Please tell me, how to do it without http:// ?

@arberiii

This comment has been minimized.

Copy link

@arberiii arberiii commented Nov 1, 2018

Do you also know why a text like makedoc.sh renders as a link and how to prevent it? I want to to mention this file in my markdown.

Plain works fine with me now. I run into this discussion while I was writing using https://dillinger.io/ and no answer was working but then just pushed the commit and worked fine.

@AppleKatz

This comment has been minimized.

Copy link

@AppleKatz AppleKatz commented Dec 20, 2018

@braksator Thanks! To me, yours was the simplest answer since my text was already inside a code block:
original: var="http://google.com"
modified-raw: var=`"http://google.com"`
modified-rendered: var="http://google.com"

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jan 2, 2019

Hey, thank you all. You really helped me.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jan 28, 2019

Hello, I'm not sure, but when I remove the "Disqus" comment plugin, autolink stops generating automatically.

Can someone also perform the same test?

@chrisdothtml

This comment has been minimized.

Copy link

@chrisdothtml chrisdothtml commented Jan 30, 2019

This also works for disabling/escaping references to PRs or issues:

#103

#<span></span>103
@scottdorman

This comment has been minimized.

Copy link

@scottdorman scottdorman commented Mar 20, 2020

For future reference, to disable the # from autolinking to a PR or issue, you can also just do

#103

#<span/>103

(Same as https://gist.github.com/alexpeattie/4729247#gistcomment-2824646, but fewer characters.)

@J0hnL0cke

This comment has been minimized.

Copy link

@J0hnL0cke J0hnL0cke commented May 5, 2020

Use 2 HTML comments. They aren't visible, and you can leave a message to others editing the document to explain what they're for.

Old: https://gist.github.com/alexpeattie/4729247

New: https://gist.github.com/alexpeattie/4729247

Code: https://<!--This is a comment-->gist.github.com/<!--This is, too-->alexpeattie/4729247

@baflo

This comment has been minimized.

Copy link

@baflo baflo commented Jun 16, 2020

In my case, Socket.io bothered me, as it was rendered differently on Github than it was in VSCode: Markdown All In One. Using the <n/> suffix it's disabled in both engines.


github.com
github.com<n/>
www.github.com

github.com
github.com
www.github.com


<n/>www.github.com
www.github.<n/>com
www.github.com<n/>

www.github.com
www.github.com
www.github.com


<!---->www.github.com

www.github.com
@willianfalbo

This comment has been minimized.

Copy link

@willianfalbo willianfalbo commented Jun 17, 2020

My hero! =D

@potados99

This comment has been minimized.

Copy link

@potados99 potados99 commented Jun 30, 2020

Thank you!

@samyakranjan

This comment has been minimized.

Copy link

@samyakranjan samyakranjan commented Sep 30, 2020

How can I make hyperlinks work for opening settings in windows?
Eg. ms-settings:windowsupdate
It isn't working and cant find a way to make it clickable

@jddcef

This comment has been minimized.

Copy link

@jddcef jddcef commented Oct 4, 2020

How can I make hyperlinks work for opening settings in windows?
Eg. ms-settings:windowsupdate
It isn't working and cant find a way to make it clickable

I've got the same question, how to make a link to the ms-settings: uri's...
If I use markdown like [`Storage Settings`](ms-settings:storagesense) then it just gets made into plain text and it isn't rendered as a link at all. eg. here's an attempt: Storage Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment