Skip to content

Commit

Permalink
Merge pull request #22 from navarroj/master
Browse files Browse the repository at this point in the history
Added textarea to excluded tags
  • Loading branch information
avdgaag committed Aug 16, 2013
2 parents 860386f + f2c1cb0 commit 6865429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/typogruby.rb
Expand Up @@ -291,7 +291,7 @@ def exclude_sensitive_tags(text)
end

# Array of all the senstive tags that should be ignored by all the text filters.
EXCLUDED_TAGS = %w{head pre code kbd math script}
EXCLUDED_TAGS = %w{head pre code kbd math script textarea}

extend self
end
1 change: 1 addition & 0 deletions test/test_typogruby.rb
Expand Up @@ -89,6 +89,7 @@ def test_should_not_error_on_empty_html
def test_should_ignore_widows_in_special_tags
assert_equal '<div>Divs get no love!</div>', widont('<div>Divs get no love!</div>')
assert_equal '<pre>Neither do PREs</pre>', widont('<pre>Neither do PREs</pre>')
assert_equal '<textarea>nor text in textarea</textarea>', widont('<textarea>nor text in textarea</textarea>')
assert_equal "<script>\nreturn window;\n</script>", widont("<script>\nreturn window;\n</script>")
assert_equal '<div><p>But divs with paragraphs&nbsp;do!</p></div>', widont('<div><p>But divs with paragraphs do!</p></div>')
end
Expand Down

0 comments on commit 6865429

Please sign in to comment.