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

fixed tag stripping... #1

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

Conversation

relisher
Copy link

@RamanjitKhakh was parsing some html, and some tags were not getting deleted! This fixes a test case, and a solution we came up with that also make sure that all tags are deleted..

@jonschlinkert
Copy link
Owner

Do you remember which test was failing? I'm assuming the one that was updated.

Perhaps there was an API change in cheerio? or the arguments were passed incorrectly? I'm not sure I like the idea of using regex to do this since cheerio ought to handle it. If cheerio isn't doing what's expected, it seems like we should create an issue there, rather than monkey-patching this code. thoughts?

@relisher
Copy link
Author

relisher commented Jul 1, 2016

ah! my favorite stackoverflow article! I guess we should create an issue on the cheerio repo, and I'll use the patchworked code in the meanwhile at work. I think what the article was targeting was more so finding the text in between tags and wholly parsing html, because that would require lookbehinds, etc. for something as simple as removing tags wholly including the text inside of the tags, it seems that regex works very well...

@jonschlinkert
Copy link
Owner

think what the article was targeting was more so finding the text in between tags and wholly parsing html

yeah I was just going for a bit of humor lol.

which tags weren't working for you? all of them, or just specific ones?

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

Successfully merging this pull request may close these issues.

None yet

2 participants