Skip to content
This repository has been archived by the owner on Oct 3, 2018. It is now read-only.

pass match index to replace function in emojify.replace #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

pass match index to replace function in emojify.replace #155

wants to merge 1 commit into from

Conversation

keeth
Copy link

@keeth keeth commented Oct 8, 2015

I am working on a React component that wraps emojify.js.

Having access to the index of the match would save me a bit of work,
since I need to break up the string into React elements to replace the
emojis.

A more complete solution would return an array of match objects, similar
to linkify-it. But this is a simple change that gets me 90% there.

Thanks!

I am working on a React component that wraps emojify.js.

Having access to the index of the match would save me a bit of work,
since I need to break up the string into React elements to replace the
emojis.

A more complete solution would return an array of match objects, similar
to linkify-it.  But this is a simple change that gets me 90% there.

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

Successfully merging this pull request may close these issues.

1 participant