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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daacf5922a3a755bde417d19c68e1c51d4cb2402
|
4
|
+
data.tar.gz: abd2ab9441490e5b77cea971a6097cf08c08fe13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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)
|
@@ -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
|
+
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:
|
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.
|
172
|
+
rubygems_version: 2.4.6
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Magnet specified markdown processor
|