-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Implement new context option: ignored_ancestor_tags to accept more ignored tags. #170
Implement new context option: ignored_ancestor_tags to accept more ignored tags. #170
Conversation
def call | ||
doc.search('text()').each do |node| | ||
content = node.to_html | ||
next unless content.include?(':') | ||
next if has_ancestor?(node, %w(pre code tt)) | ||
next if has_ancestor?(node, ignored_ancestor_tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change, but I'd skip the ignored_pattern
. This filter is designed to run on HTML fragments, so we should assume that tags is a reasonable input to work with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Got it. Removed ignored_pattern
.
Error due to Nokogiri 1.6.6.2 & 1.6.6.1, works on 1.6.5:
|
Team Nokogiri is looking into this at sparklemotion/nokogiri#1233 |
- As identified in #170, nokogiri 1.6.x is buggy - Team nokogiri is working on the fix sparklemotion/nokogiri#1233 - Until the bug is fixed, define a range of working nokogiri gems
since #176 pinned the nokogiri version, could someone please restart the tests please 😄 ? Thanks! |
@JuanitoFatas you'll need to merge the latest master into your branch and push. That'll restart the build and have the changes from #176. |
@jch Ah right I need to rebase 😛, rebased and force pushed, please check again! 😃 |
👍 |
@JuanitoFatas I usually just do a merge from master rather than rebase and force push, but it's a matter of preference. Thanks for updating. |
…tern-for-emoji-filter Implement new context option: ignored_ancestor_tags to accept more ignored tags.
Hello maintainer,
I attempt to fix #163 by implementedignored_pattern
.And while reading conversations in #163,
above quote inspired me to implement ignored_ancestor_tags.
Then we could specify more tags to stop the emojification process if we want.
Please take a look. 🙇 🙏
Thanks!!