Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some links from Arch Wiki are broken after rendering #102

Closed
tiye opened this issue Dec 22, 2012 · 3 comments
Closed

some links from Arch Wiki are broken after rendering #102

tiye opened this issue Dec 22, 2012 · 3 comments

Comments

@tiye
Copy link

tiye commented Dec 22, 2012

I used marked in my personal blog. Several links was rendered incrrectly.

There are really some incredible links on the Chinese version, such as:

https://wiki.archlinux.org/index.php/GNOME_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#.E9.80.9A.E8.BF.87.E4.BF.AE.E6.94.B9_settings.ini_.E6.94.B9.E5.8F.98_GTK3_.E4.B8.BB.E9.A2.98

And the rendering result on my blog:

https://raw.github.com/jiyinyiyong/blog2/master/posts/linux/arch-reinstall.md
http://blog.jiyinyiyong.info/linux/arch-reinstall.md

which was fine when I post that in a Github Issue:

https://github.com/jiyinyiyong/blog2/issues/1

@Mithgol
Copy link
Contributor

Mithgol commented Feb 19, 2013

May be worked around by replacing ) with %29 in URLs.

Note: using \( instead of ( is not necessary in URLs, using \) instead of ) is not necessary in URLs, marked does not seem to process any Markdown escaped characters in URLs.

@Mithgol
Copy link
Contributor

Mithgol commented Feb 19, 2013

The fix may probably be achieved by processing some Markdown escapes (specifically \)) in URLs.

Such a fix would also require replacing

inline._href = /\s*<?([^\s]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;

with

inline._href = /\s*<?([^\s]*?[^\])>?(?:\s+['"]([\s\S]*?)['"])?\s*/;

so that the URL is required to end with [^\] (not an escaping backslash).

@joshbruce
Copy link
Member

#27 - while not strictly an extras feature, more of a "you should possibly move to markdown-it"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants