martile 0.6.1 → 0.6.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/martile.rb +9 -6
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cae919ad3738c5633faebe00988f330261e6aa76
|
4
|
+
data.tar.gz: e92aebae9a0c888783ba9b4c26579eb982c8bc45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd0f4fe7c0f0294104416f1324d36717601e755d240979053521eeefa4ec692726ddf6412491e0b6f5fbf422972097acfbe0879b4207521650c096da72b06899
|
7
|
+
data.tar.gz: 4ee690646238b127e46ad72d91222d14c93c17be7ac295643eefa70b0ea8bec3f5aba8a58b792f3e877b95212311fb9a70c0b473bcbd816b5cc7cae0c8aeba04
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/martile.rb
CHANGED
@@ -8,8 +8,9 @@ require 'dynarex'
|
|
8
8
|
require 'rdiscount'
|
9
9
|
|
10
10
|
|
11
|
-
# feature: 02-Jul-2015
|
12
|
-
#
|
11
|
+
# feature: 02-Jul-2015 Apply_filter() now filters out pre and code tags
|
12
|
+
# The shorthand !i[]() can now render an iframe tag
|
13
|
+
# e.g. !i[](http://somefile.url/sometext.txt)
|
13
14
|
# feature: 19-Jun-2015 Now uses github flavoured markdown to style the table
|
14
15
|
# 01-Jun-2015 re-applied yesterday's feature which I
|
15
16
|
# removed shortly afterwards
|
@@ -269,15 +270,17 @@ class Martile
|
|
269
270
|
|
270
271
|
end
|
271
272
|
|
272
|
-
def apply_filter(s, names
|
273
|
-
|
274
|
-
Rexle.new("<root>#{s}</root>")
|
273
|
+
def apply_filter(s, names=%w(pre code), &block)
|
274
|
+
|
275
|
+
doc = Rexle.new("<root>#{s}</root>")
|
276
|
+
#puts 'doc : ' + doc.root.xml(pretty: true).inspect
|
277
|
+
doc.root.map do |x|
|
275
278
|
|
276
279
|
if x.is_a?(String) then
|
277
280
|
block.call(x)
|
278
281
|
else
|
279
282
|
|
280
|
-
if names.grep x.name then
|
283
|
+
if not names.grep x.name then
|
281
284
|
block.call(x.xml pretty: false)
|
282
285
|
else
|
283
286
|
x
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|