extended-markdown-filter 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/extended-markdown-filter.gemspec +1 -1
- data/lib/filters/post/octicon.rb +1 -1
- data/test/test_extended_markdown_filter.rb +6 -6
- 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: 926044cc0267360827071a4f0423babf5d472ee7
|
4
|
+
data.tar.gz: 61617d15a849dbfa7d2a47d9c3d5f4e31547a110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9390a90bc1fdf7bd77fb76c219e2784cc2d0f2d3ecac2965562673bfe83622e829b0b15b97b0c1973e963a704f7c7e9caab696ec14ca990a3833e00697acb07e
|
7
|
+
data.tar.gz: af78de390bd23151492b8262859e805ebff93d47bbe579810439e38ae59510044587e0dde0a5eecbfd836e125f80a5a01c542ef4403d38515971dfca2a332478
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "extended-markdown-filter"
|
3
|
-
spec.version = "0.3.
|
3
|
+
spec.version = "0.3.3"
|
4
4
|
spec.authors = ["Garen Torikian"]
|
5
5
|
spec.email = ["gjtorikian@gmail.com"]
|
6
6
|
spec.summary = %q{Add extended markup syntax to the HTML::Pipeline}
|
data/lib/filters/post/octicon.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Filters
|
2
2
|
module PostFilter
|
3
3
|
def format_octicons!(html)
|
4
|
-
html.gsub!(/#{Filters.front_wrap}\s*octicon-(\S+)\s*([^\\#{Filters.wrap_symbol}]+)\s*#{Filters.end_wrap}/, %|<span class="octicon
|
4
|
+
html.gsub!(/#{Filters.front_wrap}\s*octicon-(\S+)\s*([^\\#{Filters.wrap_symbol}]+)\s*#{Filters.end_wrap}/, %|<span class="octicon octicon-\\1" aria-label="\\2" title="\\2"></span>|)
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
@@ -132,27 +132,27 @@ class HTML::Pipeline::ExtendedMarkdownFilterTest < Minitest::Test
|
|
132
132
|
doc = ExtendedMarkdownFilter.to_document(fixture("octicon.md"), {})
|
133
133
|
assert doc.kind_of?(HTML::Pipeline::DocumentFragment)
|
134
134
|
|
135
|
-
assert_equal 1, doc.css('span.cat').size
|
135
|
+
assert_equal 1, doc.css('span.octicon-cat').size
|
136
136
|
assert_match "{{ octicon dog", doc.to_s
|
137
|
-
assert_match '<p><a href="http://alink.com">Click <span class="octicon gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
137
|
+
assert_match '<p><a href="http://alink.com">Click <span class="octicon octicon-gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
138
138
|
end
|
139
139
|
|
140
140
|
def test_block_octicon
|
141
141
|
doc = ExtendedMarkdownFilter.to_document(fixture("block_octicon.md"), {:emf_use_blocks => true})
|
142
142
|
assert doc.kind_of?(HTML::Pipeline::DocumentFragment)
|
143
143
|
|
144
|
-
assert_equal 1, doc.css('span.cat').size
|
144
|
+
assert_equal 1, doc.css('span.octicon-cat').size
|
145
145
|
assert_match "[[ octicon dog", doc.to_s
|
146
|
-
assert_match '<p><a href="http://alink.com">Click <span class="octicon gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
146
|
+
assert_match '<p><a href="http://alink.com">Click <span class="octicon octicon-gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
147
147
|
end
|
148
148
|
|
149
149
|
def test_oction_conversion
|
150
150
|
doc = ExtendedMarkdownFilter.to_document(fixture("octicon.md"), {:emf_use_blocks => true})
|
151
151
|
assert doc.kind_of?(HTML::Pipeline::DocumentFragment)
|
152
152
|
|
153
|
-
assert_equal 1, doc.css('span.cat').size
|
153
|
+
assert_equal 1, doc.css('span.octicon-cat').size
|
154
154
|
assert_match "{{ octicon dog", doc.to_s
|
155
|
-
assert_match '<p><a href="http://alink.com">Click <span class="octicon gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
155
|
+
assert_match '<p><a href="http://alink.com">Click <span class="octicon octicon-gear" aria-label="Settings " title="Settings "></span></a></p>', doc.to_s
|
156
156
|
end
|
157
157
|
|
158
158
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extended-markdown-filter
|
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
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html-pipeline
|