martile 0.6.12 → 0.6.13

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: bf3c0bdf2c64581ffa77bb5d421f85a4c96bf6b8
4
- data.tar.gz: b727446abef11aaaa3379c4c96babae5df5b270f
3
+ metadata.gz: 9ea6c139a32d1a8c8dea024b0786ca9211ee5045
4
+ data.tar.gz: f73eda36e6441bec1f4b94c92ea27fe45336bef2
5
5
  SHA512:
6
- metadata.gz: 5601ff65d86e5fd853de0123e24f49a23558d9c2c0ec9f5448fb617b5a7f966e1795c9a80538c701c481e7e65877d0f19c944027af016cc8218dce211edfe4aa
7
- data.tar.gz: d3199d5e0d73252780cbf421403927019f5158b3c7f93e2172ee65cd18e3196cddcbb8e04e96931fa2ae2a7770d56555ed8004ad616ddcdc1e9242e5cdd87eef
6
+ metadata.gz: 3b523499f9be29cea8b7f3ad35c0344b9cb163f91795a843b575b46fcf6dffc75af0e6f99b0918c80c46ed68217402f44656320951df0f3c6bf6b25e3878bb31
7
+ data.tar.gz: f5564b4c32cb098eff143e69e5901e72edf6525329644ea9d79b8a51492616d7581fc09eacd692e4ba0f03c322a5a3aef0bed0adb984efe46e667f5fde265105
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/martile.rb CHANGED
@@ -9,6 +9,7 @@ require 'rdiscount'
9
9
  require 'kvx'
10
10
 
11
11
 
12
+ # bug fix: 06-Oct-2015 Can now handle multiple smart links on the same line
12
13
  # bug fix: 17-Aug-2015 dx_render_table() was missing a couple of parameters
13
14
  # feature: 09-Aug-2015 kvx_to_dl() can convert a kind of
14
15
  # markdown URL to a DL HTML list
@@ -464,10 +465,14 @@ class Martile
464
465
  end
465
466
 
466
467
  def smartlink(s)
467
-
468
- s.gsub(/\B\?([^\n]+) +(https?:\/\/.*\?)(?=\B)/) do
469
- "[%s](%s)" % [$1, ($2).chop]
470
- end
468
+
469
+ s.split(/(?= \?)/).inject('') do |r, substring|
470
+
471
+ r << substring.gsub(/\B\?([^\n]+) +(https?:\/\/.[^\?]+\?)(?=\B)/) do |x|
472
+ "[%s](%s)" % [$1, ($2).chop]
473
+ end
474
+
475
+ end
471
476
 
472
477
  end
473
478
 
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.12
4
+ version: 0.6.13
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-08-17 00:00:00.000000000 Z
34
+ date: 2015-10-06 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
Binary file