magnet-markdown 0.0.4 → 0.0.5

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: b49a30f1ada7a158ee2db94da1a0c59919c0fb1d
4
- data.tar.gz: e1219c0d53c7ac2e8b2db2aba11851555300bedc
3
+ metadata.gz: daacf5922a3a755bde417d19c68e1c51d4cb2402
4
+ data.tar.gz: abd2ab9441490e5b77cea971a6097cf08c08fe13
5
5
  SHA512:
6
- metadata.gz: a7a554120390da4c671b9bc767101b74f085046731707425c81316ae6269ac5d102872997f3bad7df061d6e4007e9c556e97305d8aa7f967fb35421ab07365ad
7
- data.tar.gz: 3e187813ea09ad516e02b9213f193f36f7f598d6b7ffd957c9e5c60f4d22a8fb3c432797597d71c0a5cc82832bea01f992704c3a7a021586c0f62eda989b2479
6
+ metadata.gz: 83f30fad2a88fad93b0ca9ca1b55589e8cfe3bde735dc8d63846c244a3b4b54ab8ee27a1ba603eaa72b865b240a8190ec0ae6f5676c66cd71697a9b043dff05b
7
+ data.tar.gz: db77bceb8352642784124ae4ec183c8006cc631ef7c7326538da9f2a78bb778ea047bc733c3374e2b095dd5e86eb1f37db80338f9124d3379a70ea6537d49947
@@ -15,8 +15,8 @@ class Magnet::Markdown::Filter::Emoji < HTML::Pipeline::Filter
15
15
  end
16
16
 
17
17
  def call
18
- doc.search('text()').each do |node|
19
- content = node.to_html
18
+ doc.search('.//text()').each do |node|
19
+ content = node.text
20
20
  next unless content.include?(':')
21
21
  next if has_ancestor?(node, %w(pre code tt))
22
22
  html = emojify(content)
@@ -1,5 +1,5 @@
1
1
  module Magnet
2
2
  module Markdown
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
@@ -50,6 +50,9 @@ class Magnet::Markdown::ProcessorTest < Test::Unit::TestCase
50
50
  assert { !output.include?('/images/emoji') && output.include?('http://static.emoji/emoji') }
51
51
  @call_context = { emoji_root: 'http://static.emoji/', emoji_path: 'images/emoji/:filename' }
52
52
  assert { output.include?('http://static.emoji/images/emoji/unicode/') }
53
+ @input = '<b>test</b> :thumbsup:'
54
+ assert { output.include?('<img') }
55
+ assert { output.include?('<b') }
53
56
  end
54
57
 
55
58
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magnet-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Kusano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.2.2
172
+ rubygems_version: 2.4.6
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Magnet specified markdown processor