martile 0.6.17 → 0.6.18

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: ec9c4d7ffe7b1be162089cec9ed11ef648718a2f
4
- data.tar.gz: 8e659d8e8ba2fbb5bff1fee813ef11bcb02f8e58
3
+ metadata.gz: 8c2d4641b4d5ce9666eb10463896695a47aaf38b
4
+ data.tar.gz: 179d7c0b054ca734f3d9f50fac593192c9f2ca65
5
5
  SHA512:
6
- metadata.gz: 8da9e5469d66fbd9757e59b22de97f8d7d65a11fb9015fb5148606791d1ec65f2d4689b7a91a1cace8d541170f8b00568a6ba29ecfb0d3c038e815832170a963
7
- data.tar.gz: 00f6e0a7825804c260d71dcaaf1b00b0ffdb8541dd6760d644739157c74dd77bb93ce37321708e87316fc6b23218735f25a72065c07c8b43a3e10e7a3a47abd7
6
+ metadata.gz: 57d5e875a4dd15d5c596492583c15cef87612ea4fa119cf7004d229faff89d99a4d2f58b57a1df662fb74f069a3cbaf4795fb099b5827e577153f7b8dbb26a77
7
+ data.tar.gz: 2827d09982501090a6006f4c595d36885cc71bff8d4dc1610a666332cfbbd7ff4b79dd0587bfbdd48f729808c711a56ec3b244e0fd3fc5339114073ebd5d2cf6
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ��#$���k�����C����mH���2���243K��wS}� ,�d3}M�yXȖ�^x�Pi0,�kJ?m+�0jn��,L�9���*���)�VWY�Ǎf&j���~��=����?3��`\��ke��I H�����a�^�����v�(�r=rˇ�B�_���)->��4�P�o��6a-}]=�D���
2
- $�z�G,Z1"���^���eb-E� ��:Z��ޭ�K���4�gW���F�,C
1
+ �G���OO�{H�#/��2�˜��p$3/"&��IT�w����qc7sv���6��<“�
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
+ # bug fix: 03-Dec-2015 A smartlink which ends with a closing parenthesis is
13
+ # now output to a regular anchor tag
12
14
  # bug fix: 22-Oct-2015 The method apply_filter() is now used
13
15
  # with the section() method
14
16
  # feature: 10-Oct-2015 A hyperlink can now be create from a
@@ -482,7 +484,14 @@ class Martile
482
484
  s.split(/(?= \?)/).inject('') do |r, substring|
483
485
 
484
486
  r << substring.gsub(/\B\?([^\n]+) +(https?:\/\/.[^\?]+\?)(?=\B)/) do |x|
485
- "[%s](%s)" % [$1, ($2).chop]
487
+
488
+ content, link = $1, ($2).chop
489
+
490
+ if (link)[/\)$/] then
491
+ "<a href='%s'>%s</a>" % [link, content]
492
+ else
493
+ "[%s](%s)" % [content, link]
494
+ end
486
495
  end
487
496
 
488
497
  end
@@ -561,4 +570,4 @@ class Martile
561
570
  s.gsub(/\B*( +)([^\n]+)\s+(https?:\/\/.*)/,'\1[\2](\3)')
562
571
 
563
572
  end
564
- end
573
+ 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.17
4
+ version: 0.6.18
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-10-22 00:00:00.000000000 Z
34
+ date: 2015-12-03 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
Binary file