martile 0.6.28 → 0.6.29
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 +13 -3
- metadata +2 -2
- 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: d35ea75ad96bb5904232d0b7edf0d3ae20d038ab
|
|
4
|
+
data.tar.gz: 446b10e8c40fa5758a97b9fe5d90d9710b0f0629
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca0cbe07a23833611287748ec2728dfda66d8113939747b1a29c371e507c67e99448328db440dca9659e8d1eecec53b32d1189db0d27258abd9ddc9e2a2c9f36
|
|
7
|
+
data.tar.gz: 054a7023189ef012e5082a0e7e8db0e5248fec763cc2d288875258f4fe1374d961fedd4ed49c7e50bccf24186b759eb1e9e1c1f012038f356189de5dd01900ff
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/martile.rb
CHANGED
|
@@ -9,6 +9,8 @@ require 'rdiscount'
|
|
|
9
9
|
require 'kvx'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
# feature: 24-Jun-2016 links containing a right parenthesis at the
|
|
13
|
+
# end are no longer cropped
|
|
12
14
|
# bug fix: 11-Jun-2016 pre tags are now filtered out properly
|
|
13
15
|
# feature: 22-May-2016 Introduced the __DATA__ section which appears at
|
|
14
16
|
# the end of the document to reference 1 or more raw
|
|
@@ -114,10 +116,10 @@ class Martile
|
|
|
114
116
|
s16 = apply_filter(s15) {|x| list_item_to_hyperlink x }
|
|
115
117
|
#puts 's16 : ' + s16.inspect
|
|
116
118
|
s17 = apply_filter(s16) {|x| mtlite_utils x }
|
|
117
|
-
|
|
119
|
+
s18 = apply_filter(s17) {|x| hyperlinkify x }
|
|
118
120
|
#puts 's17 : ' + s17.inspect
|
|
119
121
|
|
|
120
|
-
@to_s =
|
|
122
|
+
@to_s = s18
|
|
121
123
|
end
|
|
122
124
|
|
|
123
125
|
def to_html()
|
|
@@ -329,6 +331,14 @@ class Martile
|
|
|
329
331
|
|
|
330
332
|
end
|
|
331
333
|
|
|
334
|
+
def hyperlinkify(s)
|
|
335
|
+
|
|
336
|
+
s.gsub(/\[([^\[]+)\]\(([^\)]+\)\)?\))/) do |x|
|
|
337
|
+
"<a href='#{$2.chop}'>#{$1}</a>"
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
end
|
|
341
|
+
|
|
332
342
|
def mtlite_utils(s)
|
|
333
343
|
|
|
334
344
|
# convert square brackets to unicode check boxes
|
|
@@ -572,4 +582,4 @@ class Martile
|
|
|
572
582
|
s.gsub(/\B(\* +)([^\n]+)\s+(https?:\/\/.*)/,'\1[\2](\3)')
|
|
573
583
|
|
|
574
584
|
end
|
|
575
|
-
end
|
|
585
|
+
end
|
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.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
fHJRwdYS8tvLYH9UFytJxDKjlovBuFUsfKP0FJlZGQGJM5JiIj5LWelTGJtJD8hI
|
|
32
32
|
2jPlwrOtiqZt2A==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2016-06-
|
|
34
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rdiscount
|
metadata.gz.sig
CHANGED
|
Binary file
|