martile 0.6.28 → 0.6.29

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: 2c27a84eb62497e8c17af299fdb740c14e80f709
4
- data.tar.gz: c62e29e1f18f2b76ab6f850cd7f3ffc58b8845f1
3
+ metadata.gz: d35ea75ad96bb5904232d0b7edf0d3ae20d038ab
4
+ data.tar.gz: 446b10e8c40fa5758a97b9fe5d90d9710b0f0629
5
5
  SHA512:
6
- metadata.gz: cc74c733a4aaf5e1fa3c638fdde27c3f56a3ae3d55fdb8cf5685cc569ddb01e80bc9ecfb1a269ed10af3cef4c74c63399d64ef64822036be12a65d5020fb5c9e
7
- data.tar.gz: 1110f77cf75e3241839f5ae909dce8a71477375c9a083a54db88e6ef26d423820de5792b8f593c3a6a14afd9e2c87a83ae02c253bf189f6253b7a3f7d50790d7
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 = s17
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.28
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-11 00:00:00.000000000 Z
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