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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c642832df3cebbd5ff200d7c90df281731b9db7
4
- data.tar.gz: 27841ed12430bba30e6aee3ffe3f15491ab29bab
3
+ metadata.gz: a47e77c7be1810c15637823b7d63e8a41d349fe9
4
+ data.tar.gz: 31a607bc832991a5251c46cec2082a961becc8a5
5
5
  SHA512:
6
- metadata.gz: 7e1ce451ab3e68f39af7dcfbc072791d25c0970122b7804f702da59e659d7668e174c7cd0789cb9703cb78eb8ea956ed79e864b6287b6b7d2eb14e593a37b92e
7
- data.tar.gz: 8f0ed46f7385518a09bc468e58770f704ae1df55c1eeb249537292c5f50a010b739d69c7a42ac3f35f886aabf05deaa37a535ba4aba5c56351462274c5b79d1a
6
+ metadata.gz: c41b73c3bf5a2ec8c9a0fd7d5d6a99344b0819511ae5c2aa9c919feff458fd9f7ca6d5e10b9820f41d4077ba9fbbe2583151e96c615867ce234c133b7d9e05d7
7
+ data.tar.gz: 37de02c4256222eedd533f053fa1f9e5de04a304fbf0430c4344bc474bcb2ff63dba7b1f11ddfbf458781d784c624e3a43134a854c0c7efc8dc5b73fbb5f37ec
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+
3
+ * Fix encoding issue with Nokogiri in `english_typograph`.
4
+
1
5
  ## 0.2 “Ptolemaeus Crater”
2
6
 
3
7
  * Add `english_typograph` helper.
@@ -22,10 +22,5 @@ module EvilFront
22
22
  tiny.map { |i| Regexp.new("( | )(#{Regexp.quote i}) ") }
23
23
  end
24
24
  end
25
-
26
- # Apply all typograph methods to text
27
- def self.typograph_all(text)
28
- typograph(text)
29
- end
30
25
  end
31
26
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EvilFront
2
- VERSION = '0.2.0' unless defined? EvilFront::VERSION
2
+ VERSION = '0.2.1' unless defined? EvilFront::VERSION
3
3
  end
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.0
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-01-31 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n