evil-front 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +4 -0
- data/lib/evil-front/english.rb +0 -5
- data/lib/evil-front/typograph.rb +6 -1
- data/lib/evil-front/version.rb +1 -1
- 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: a47e77c7be1810c15637823b7d63e8a41d349fe9
|
4
|
+
data.tar.gz: 31a607bc832991a5251c46cec2082a961becc8a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c41b73c3bf5a2ec8c9a0fd7d5d6a99344b0819511ae5c2aa9c919feff458fd9f7ca6d5e10b9820f41d4077ba9fbbe2583151e96c615867ce234c133b7d9e05d7
|
7
|
+
data.tar.gz: 37de02c4256222eedd533f053fa1f9e5de04a304fbf0430c4344bc474bcb2ff63dba7b1f11ddfbf458781d784c624e3a43134a854c0c7efc8dc5b73fbb5f37ec
|
data/ChangeLog.md
CHANGED
data/lib/evil-front/english.rb
CHANGED
data/lib/evil-front/typograph.rb
CHANGED
@@ -12,7 +12,7 @@ module EvilFront
|
|
12
12
|
return html if html.nil? or html.empty?
|
13
13
|
|
14
14
|
if html.include? '<'
|
15
|
-
nodes = Nokogiri::HTML::DocumentFragment.parse(html)
|
15
|
+
nodes = Nokogiri::HTML::DocumentFragment.parse(html, 'utf-8')
|
16
16
|
typograph_node! nodes
|
17
17
|
nodes.to_html
|
18
18
|
else
|
@@ -36,6 +36,11 @@ module EvilFront
|
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
+
# Apply all typograph methods to text
|
40
|
+
def typograph_all(text)
|
41
|
+
typograph(text)
|
42
|
+
end
|
43
|
+
|
39
44
|
# Recursively apply typography to Nokogiri nodes
|
40
45
|
def typograph_node!(node)
|
41
46
|
return if %w(pre code kbd script style math).include? node.name
|
data/lib/evil-front/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evil-front
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|