threedaymonk-l10nizer 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/l10nizer/grammar.treetop +1 -1
- data/lib/l10nizer/version.rb +1 -1
- data/test/test_processor.rb +8 -2
- metadata +1 -1
data/lib/l10nizer/version.rb
CHANGED
data/test/test_processor.rb
CHANGED
@@ -89,12 +89,12 @@ class ProcessorTest < Test::Unit::TestCase
|
|
89
89
|
|
90
90
|
context "when string contains inline markup" do
|
91
91
|
setup do
|
92
|
-
html = "<p>String with
|
92
|
+
html = "<p>String with <strong>strong</strong> and <em>emphasised</em> text</p>"
|
93
93
|
@l10nizer = L10nizer::Processor.new(html, lambda{ "key" })
|
94
94
|
end
|
95
95
|
|
96
96
|
should "include that markup in text" do
|
97
|
-
expected = "String with
|
97
|
+
expected = "String with <strong>strong</strong> and <em>emphasised</em> text"
|
98
98
|
assert_equal [expected], @l10nizer.l10ns.values
|
99
99
|
end
|
100
100
|
|
@@ -104,6 +104,12 @@ class ProcessorTest < Test::Unit::TestCase
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
should "not consider <span> to be inline markup" do
|
108
|
+
html = %{foo <span>bar</span>}
|
109
|
+
l10nizer = L10nizer::Processor.new(html, DumbKeyGenerator.new)
|
110
|
+
assert_equal ["bar", "foo"], l10nizer.l10ns.values.sort
|
111
|
+
end
|
112
|
+
|
107
113
|
context "when parsing a sample document" do
|
108
114
|
setup do
|
109
115
|
@html = File.read(File.join(File.dirname(__FILE__), "samples", "input.html.erb"))
|