martile 0.6.13 → 0.6.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ea6c139a32d1a8c8dea024b0786ca9211ee5045
4
- data.tar.gz: f73eda36e6441bec1f4b94c92ea27fe45336bef2
3
+ metadata.gz: 7e492add84b1b0dc320bfd85575d9b474d65fc56
4
+ data.tar.gz: 805435df7a6bf968fdbf58d4d1ac509c9983e60c
5
5
  SHA512:
6
- metadata.gz: 3b523499f9be29cea8b7f3ad35c0344b9cb163f91795a843b575b46fcf6dffc75af0e6f99b0918c80c46ed68217402f44656320951df0f3c6bf6b25e3878bb31
7
- data.tar.gz: f5564b4c32cb098eff143e69e5901e72edf6525329644ea9d79b8a51492616d7581fc09eacd692e4ba0f03c322a5a3aef0bed0adb984efe46e667f5fde265105
6
+ metadata.gz: 3b4ab0df5db1d6a2133e323fad7e506e33d4a41ee24a6e425d87682e083595f5da4d2b964dc92930be9a9d20296d8463de7573f0d42af1c78d0f0412b4b1585d
7
+ data.tar.gz: dfb8f0d718fa7d199ccf08417ae67471dde210b89678a941018cdd6ac610f313c2709686611ae9314d6e97a3e04a32ad9039589b252685d2449e20fce794788e
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: 10-Oct-2015 A hyperlink can now be create from a
13
+ # list item containing a URL
12
14
  # bug fix: 06-Oct-2015 Can now handle multiple smart links on the same line
13
15
  # bug fix: 17-Aug-2015 dx_render_table() was missing a couple of parameters
14
16
  # feature: 09-Aug-2015 kvx_to_dl() can convert a kind of
@@ -125,16 +127,18 @@ class Martile
125
127
  s8 = apply_filter(s7) {|x| underline x }
126
128
  s9 = apply_filter(s8) {|x| smartlink x }
127
129
  #s10 = apply_filter(s9) {|x| section x }
128
- s10 = apply_filter(s9) {|x| mtlite_utils x }
129
- s11 = section s10
130
+
131
+ s11 = section s9
130
132
  s12 = apply_filter(s11){|x| audiotag x}
131
133
  s13 = apply_filter(s12){|x| videotag x}
132
134
  s14 = apply_filter(s13){|x| iframetag x}
133
135
  s15 = apply_filter(s14){|x| kvx_to_dl x}
136
+ s16 = apply_filter(s15){|x| list_item_to_hyperlink x}
137
+ s10 = apply_filter(s16) {|x| mtlite_utils x }
134
138
 
135
139
  #puts 's8 : ' + s8.inspect
136
140
 
137
- @to_s = s15
141
+ @to_s = s10
138
142
  end
139
143
 
140
144
  def to_html()
@@ -483,6 +487,8 @@ class Martile
483
487
 
484
488
  end
485
489
 
490
+ # makes HTML sections out of string blocks which start with an
491
+ # equals sign and end with an equals sign
486
492
  def section(s)
487
493
 
488
494
  a = s.lines
@@ -540,4 +546,10 @@ class Martile
540
546
  end
541
547
 
542
548
  end
549
+
550
+ def list_item_to_hyperlink(s)
551
+
552
+ s.gsub(/\B*( +)([^\n]+)\s+(https?:\/\/.*)/,'\1[\2](\3)')
553
+
554
+ end
543
555
  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.13
4
+ version: 0.6.14
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-06 00:00:00.000000000 Z
34
+ date: 2015-10-10 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- G���<�VD䉱,h�^�_L�%؀�֑��2y��蜳Qe����[ o���:~�D��I|�XH}�eXH)���!Zr� ���5��hp$N"�4��^�M�6� K�L�Aa�k��p�J
2
- ��Jb4��uL@{1^�� ��N�)��?^��]G�<������v3F+d I�����BF�f�b3x�f9\a��1�"p
1
+ ��sqHQP.6)�ɐ=�,yy���>���$^qo5/��at�'����f?�
2
+ [%�!�����^:HIh$��Lq�T���1<�. 򌢡�Sd���G�*��ܯ�+�Z��-Ӌ�y]V2]6yeA9�3���q���~�W���