cmark-gfm icon indicating copy to clipboard operation
cmark-gfm copied to clipboard

GFM autolink extension (`www.` part): uppercase does not match on issues/PRs/comments

Open wooorm opened this issue 3 years ago • 1 comments

The prefix www, for autolink literals, only matches when lowercase, in comments. This is different from how the protocol prefix (http://, https://) is handled, which is matched case-insensitive. It is also different from how www is matched on Gists or in markdown files in a repo.

To illustrate:

## WWW autolink literals

www.commonmark.org

Www.commonmark.org

wWw.commonmark.org

wwW.commonmark.org

WWW.COMMONMARK.ORG

## Protocol autolink literals

http://commonmark.org

https://commonmark.org

Http://commonmark.org

Https://commonmark.org

hTtp://commonmark.org

hTtps://commonmark.org

HTTP://commonmark.org

HTTPS://commonmark.org

WWW autolink literals

www.commonmark.org

Www.commonmark.org

wWw.commonmark.org

wwW.commonmark.org

WWW.COMMONMARK.ORG

Protocol autolink literals

http://commonmark.org

https://commonmark.org

Http://commonmark.org

Https://commonmark.org

hTtp://commonmark.org

hTtps://commonmark.org

HTTP://commonmark.org

HTTPS://commonmark.org


Pasting the above markdown in a private gist shows that each link is linked there.

wooorm avatar Sep 02 '22 13:09 wooorm

If this is fixed in GFM the spec for autolinking should be updated as well.

UziTech avatar Sep 02 '22 15:09 UziTech