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

How to disable the auto-hyperlink for a url? #2482

Closed
zhaiqianfeng opened this issue Apr 2, 2017 · 5 comments
Closed

How to disable the auto-hyperlink for a url? #2482

zhaiqianfeng opened this issue Apr 2, 2017 · 5 comments

Comments

@zhaiqianfeng
Copy link

If my post contain a url such as"http://localhost",the url in the generated html will be wrapped a hyperlink such as http://localhost.

How to disable?
Please help me. Thanks.

@NoahDragon
Copy link
Member

You could change http://localhost to wrap with back-tick ` .

http://localhost

@zhaiqianfeng
Copy link
Author

If so,hexo will generate the "code" tag.
Is there any other methods?
@NoahDragon

@NoahDragon
Copy link
Member

Here have more trick ways to disable auto link: https://gist.github.com/alexpeattie/4729247

In Hexo, you could also create helper or filter to handle the link.

@NoahDragon
Copy link
Member

markedjs/marked#882 (comment) proposed a solution. I think we could add it to the hexo-renderer-markdown plugin.

Close this issue and move it to the corresponding repo.

@NoahDragon
Copy link
Member

The feature has added to hexo-renderer-marked 0.3.0 hexojs/hexo-renderer-marked#34

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

2 participants