Skip to content

Instantly share code, notes, and snippets.

@jojo89
Created April 11, 2014 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jojo89/10487514 to your computer and use it in GitHub Desktop.
Save jojo89/10487514 to your computer and use it in GitHub Desktop.
#to
def normalized_content_from_content
if client
options = {
blacklisted_elements: client.article_blacklisted_elements,
whitelisted_tags: client.article_whitelisted_tags,
}
ContentNormalization.new(content, options).normalized_content
else
nil
end
end
#from
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