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

Add match structure object for safer HTML wrapping of strings #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wolfd
Copy link

@wolfd wolfd commented May 16, 2016

It may be a bit overkill, but returning an array of little objects containing whether each character is a match allows for easier parsing of the structure in other applications.

I have a use case where I need to transform the example <b> </b> tags into React components, which is possible by parsing through the string, finding matching tags, and replacing them with React components, but the original library is where this code should be.

The added single variable and if statement added to the main loop of the program will slightly degrade performance, but I believe the cost/benefit ratio is worth it for other people considering the fuzzy library.

@mattyork
Copy link
Owner

Thanks for the PR. Investigating this. The problem it solves is definitely worth solving, but not sure this is the best approach.

Created issue #26 to track this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants