martile 0.6.0 → 0.6.1
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 +16 -2
- metadata +2 -2
- metadata.gz.sig +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1eb7bd41468a4b9f87cb9082636c26a7c2e227c
|
|
4
|
+
data.tar.gz: a64543a59e9146c19de0a414959a4a37e2cc1e81
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d9bf2ae03d6c2a9d484440f95bcddd4bdc1bdc8a388864f6ffdd4d6264861d48e4199e5e06a0564c2f8176f874aa10a1f2483d39fab098743147f70a6c957d4
|
|
7
|
+
data.tar.gz: f93a8b05b7c2067d2f9d51f27692c7b862ff64e4bcd6563b3e816a858ddf75ca68b31a4c92543790d84329a0c82a66b8f121d37a0d1a7fa292551b87a97128ed
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/martile.rb
CHANGED
|
@@ -8,6 +8,8 @@ require 'dynarex'
|
|
|
8
8
|
require 'rdiscount'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
# feature: 02-Jul-2015 The shorthand !i[]() can now render an iframe tag
|
|
12
|
+
# e.g. !i[](http://somefile.url/sometext.txt)
|
|
11
13
|
# feature: 19-Jun-2015 Now uses github flavoured markdown to style the table
|
|
12
14
|
# 01-Jun-2015 re-applied yesterday's feature which I
|
|
13
15
|
# removed shortly afterwards
|
|
@@ -112,12 +114,13 @@ class Martile
|
|
|
112
114
|
s11 = section s10
|
|
113
115
|
s12 = apply_filter(s11){|x| audiotag x}
|
|
114
116
|
s13 = apply_filter(s12){|x| videotag x}
|
|
117
|
+
s14 = apply_filter(s13){|x| iframetag x}
|
|
115
118
|
|
|
116
119
|
|
|
117
120
|
|
|
118
121
|
#puts 's8 : ' + s8.inspect
|
|
119
122
|
|
|
120
|
-
@to_html =
|
|
123
|
+
@to_html = s14
|
|
121
124
|
end
|
|
122
125
|
|
|
123
126
|
private
|
|
@@ -225,7 +228,18 @@ class Martile
|
|
|
225
228
|
|
|
226
229
|
def escape(s)
|
|
227
230
|
s.gsub('<','<').gsub('>','>')
|
|
228
|
-
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def iframetag(s)
|
|
234
|
+
|
|
235
|
+
s.gsub(/\B!i\[\]\((https?:\/\/[^\)]+)\)\B/) do |x|
|
|
236
|
+
|
|
237
|
+
url = ($1)
|
|
238
|
+
|
|
239
|
+
"<iframe src='%s'></iframe>" % [url]
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
229
243
|
|
|
230
244
|
def list_to_html(s,symbol='#')
|
|
231
245
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: martile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
fnr5l+RI/6f8lfxBNgDrktGB/RwPkOyWtyKk1tu9CWgHmptxL0JglikCXg5MzuZI
|
|
32
32
|
tZzXOvXUoUf1VQ==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2015-
|
|
34
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rdiscount
|
metadata.gz.sig
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
��
|
|
1
|
+
K��7�L
|