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

Hide scheme from anchor text? #22

Closed
olalonde opened this issue Aug 4, 2016 · 3 comments
Closed

Hide scheme from anchor text? #22

olalonde opened this issue Aug 4, 2016 · 3 comments

Comments

@olalonde
Copy link

olalonde commented Aug 4, 2016

Would be nice to be able to hide http(s):// from the rendered link. e.g.:

Original:

<Linkify hideScheme>Go to https://www.github.com</Linkify>

Would render to:

Go to <a href="https://www.github.com">www.github.com</a>
@peterbe
Copy link

peterbe commented Mar 20, 2017

Perhaps we should re-phrase this issue, or file a new one?

In my use case I want to do something like this:

<Linkify textRender={text => new URL(text).hostname}>Go to https://www.github.com</Linkify>

so you get this output:

Go to <a href="https://www.github.com">www.github.com</a>

That's just one example, but the idea that I can manipulate the text before it gets inserted.

@Dzhakhar
Copy link

#36
What do you think about this commit? There is exactly what you're looking for

@tasti tasti mentioned this issue Jan 6, 2018
16 tasks
@tasti
Copy link
Owner

tasti commented Jan 7, 2018

See #36 (comment).

@tasti tasti closed this as completed Jan 7, 2018
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

4 participants