hamlit 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hamlit/compilers/old_attribute.rb +5 -1
- data/lib/hamlit/version.rb +1 -1
- data/spec/hamlit/engine/old_attributes_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f17fccee0547b3167279c8273055849258c7260d
|
4
|
+
data.tar.gz: 5af28ebd2215a7c46071937e0deb80ae160b1eab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d03161eaf316804f4f036f47adb97ef18f187130ea638a573f8ebb06a4e5137a69f086ec5ce70f732295c448e96571e6db9f473832d615bf27d6e6119fc93c
|
7
|
+
data.tar.gz: fcf649a051f1aa761fdb6ed9fefdbca8658a34c7e4c74e5cbc8a72cd634dab8c9300f8c1eb88126e021836338ee3c9788f30f499262709653898211bc9f29088
|
@@ -128,7 +128,11 @@ module Hamlit
|
|
128
128
|
splitted = []
|
129
129
|
start_pos = 1
|
130
130
|
columns.each do |end_pos|
|
131
|
-
|
131
|
+
if str.ascii_only?
|
132
|
+
splitted << str[start_pos..(end_pos - 1)]
|
133
|
+
else
|
134
|
+
splitted << str.unpack("C*")[start_pos..(end_pos - 1)].pack("C*").force_encoding('utf-8')
|
135
|
+
end
|
132
136
|
start_pos = end_pos + 1
|
133
137
|
end
|
134
138
|
|
data/lib/hamlit/version.rb
CHANGED
@@ -87,6 +87,14 @@ describe Hamlit::Engine do
|
|
87
87
|
HTML
|
88
88
|
end
|
89
89
|
|
90
|
+
it 'renders multi-byte chars as static attribute value' do
|
91
|
+
assert_render(<<-'HAML', <<-HTML)
|
92
|
+
%img{ alt: 'こんにちは' }
|
93
|
+
HAML
|
94
|
+
<img alt='こんにちは'>
|
95
|
+
HTML
|
96
|
+
end
|
97
|
+
|
90
98
|
describe 'nested attributes' do
|
91
99
|
it 'renders true attributes' do
|
92
100
|
assert_render(<<-'HAML', <<-HTML)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamlit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: temple
|