Skip to content
/ setLinks Public

A little function that will convert links found in text into <a> tags.

License

Notifications You must be signed in to change notification settings

kaore/setLinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

setLinks is a small function that will take a string and convert any links or emails it finds to markup.

For example, if you give it this string: 'Here is some random url: http://fr.wikipedia.org/wiki/Lard' it will return 'Here is some random url: <a href="http://fr.wikipedia.org/wiki/Lard">http://fr.wikipedia.org/wiki/Lard</a>'.

Emails will also be processed and converted to 'mailto' links.

setLinksElems wraps setLinks and will do the same to the content of lists of elements.

Check the examples.

About

A little function that will convert links found in text into <a> tags.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published