docomo_css 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/docomo_css.gemspec +4 -5
- data/lib/docomo_css.rb +3 -3
- data/test/docomo_css_test.rb +2 -0
- metadata +4 -4
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/docomo_css.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{docomo_css}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["milk1000cc", "Paul McMahon"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-29}
|
13
13
|
s.description = %q{Inlines CSS so that you can use external CSS with docomo handsets.}
|
14
14
|
s.email = %q{info@milk1000.cc}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -58,4 +58,3 @@ Gem::Specification.new do |s|
|
|
58
58
|
s.add_dependency(%q<tiny_css>, [">= 0"])
|
59
59
|
end
|
60
60
|
end
|
61
|
-
|
data/lib/docomo_css.rb
CHANGED
@@ -34,7 +34,7 @@ module DocomoCss
|
|
34
34
|
embed_pseudo_style(doc, extract_pseudo_style(css))
|
35
35
|
embed_style(doc, css)
|
36
36
|
end
|
37
|
-
xml_declare(doc) + doc.to_xhtml(:indent => 0)
|
37
|
+
xml_declare(doc) + doc.to_xhtml(:indent => 0, :encoding => doc.encoding)
|
38
38
|
end
|
39
39
|
|
40
40
|
def xml_declare(doc)
|
@@ -67,11 +67,11 @@ module DocomoCss
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def escape_numeric_character_reference(text)
|
70
|
-
text.gsub /&#(\d+);/, 'HTMLCSSINLINERESCAPE\1::::::::'
|
70
|
+
text.gsub /&#(\d+|x[\da-fA-F]+);/, 'HTMLCSSINLINERESCAPE\1::::::::'
|
71
71
|
end
|
72
72
|
|
73
73
|
def unescape_numeric_character_reference(text)
|
74
|
-
text.gsub /HTMLCSSINLINERESCAPE(\d+)::::::::/, '&#\1;'
|
74
|
+
text.gsub /HTMLCSSINLINERESCAPE(\d+|x[\da-fA-F]+)::::::::/, '&#\1;'
|
75
75
|
end
|
76
76
|
|
77
77
|
def stylesheet_link_node(document)
|
data/test/docomo_css_test.rb
CHANGED
@@ -22,10 +22,12 @@ class DocomoCssTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
def test_escape_numeric_character_reference
|
24
24
|
assert_equal "HTMLCSSINLINERESCAPE123456789::::::::", @filter.escape_numeric_character_reference("�")
|
25
|
+
assert_equal "HTMLCSSINLINERESCAPEx123def::::::::", @filter.escape_numeric_character_reference("�")
|
25
26
|
end
|
26
27
|
|
27
28
|
def test_unescape_numeric_character_reference
|
28
29
|
assert_equal "�", @filter.unescape_numeric_character_reference("HTMLCSSINLINERESCAPE123456789::::::::")
|
30
|
+
assert_equal "�", @filter.unescape_numeric_character_reference("HTMLCSSINLINERESCAPEx123def::::::::")
|
29
31
|
end
|
30
32
|
|
31
33
|
def test_pseudo_selectors
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docomo_css
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- milk1000cc
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-29 00:00:00 +09:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|