Skip to content

Instantly share code, notes, and snippets.

@RobinDaugherty
Forked from jojo89/gist:10487514
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinDaugherty/10488139 to your computer and use it in GitHub Desktop.
Save RobinDaugherty/10488139 to your computer and use it in GitHub Desktop.
def normalized_content_from_content
if client
options = {
blacklisted_elements: client.article_blacklisted_elements,
whitelisted_tags: client.article_whitelisted_tags,
}
else
options = nil
end
ContentNormalization.new(content, options).normalized_content if content
end
def normalized_content_from_content
options = {
blacklisted_elements: client.article_blacklisted_elements,
whitelisted_tags: client.article_whitelisted_tags,
}
ContentNormalization.new(content, options).normalized_content
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment