From f2c1cb0fb30780781615c3ae6a724fbb0f3f997f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Navarro=20P=C3=A9rez?= Date: Thu, 15 Aug 2013 09:11:14 +0100 Subject: [PATCH] added textarea to excluded tags --- lib/typogruby.rb | 2 +- test/test_typogruby.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/typogruby.rb b/lib/typogruby.rb index a766d25..288b62b 100644 --- a/lib/typogruby.rb +++ b/lib/typogruby.rb @@ -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 diff --git a/test/test_typogruby.rb b/test/test_typogruby.rb index 548ecbe..7037a63 100644 --- a/test/test_typogruby.rb +++ b/test/test_typogruby.rb @@ -89,6 +89,7 @@ def test_should_not_error_on_empty_html def test_should_ignore_widows_in_special_tags assert_equal '
Divs get no love!
', widont('
Divs get no love!
') assert_equal '
Neither do PREs
', widont('
Neither do PREs
') + assert_equal '', widont('') assert_equal "", widont("") assert_equal '

But divs with paragraphs do!

', widont('

But divs with paragraphs do!

') end