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

Option to exclude some characters to be decoded #22

Closed
wants to merge 3 commits into from

Conversation

Jerska
Copy link

@Jerska Jerska commented Mar 22, 2015

This is a pull request for issue #18 .

By looking at your rake tasks, I could see performance was an issue for you.
That's why the code has this big if/else, so that it cannot impact current usages of the gem.
I've probably added too many tests, I think you'll choose the ones you think adequate.

Cheers

@threedaymonk
Copy link
Owner

Sorry for not getting to this sooner.

I think I understand the use case, but I'm not convinced by this as a solution: I don't really like options hashes. What I think I'd like to do instead is to add a Mapping as a first-class concept, so that the interface would be something like:

mapping = HTMLEntities::Mapping::XHTML1.new.without('<', '>')
coder = HTMLEntites.new(mapping)

That might also clean up some of the ambiguity in the SGML mappings. I still haven't quite worked out the interface exactly in my head, however.

@Jerska Jerska closed this Aug 17, 2017
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.

2 participants