martile 0.3.0 → 0.3.1
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 +2 -3
- data/lib/martile.rb +9 -1
- 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: 1101460d909dae1807654b507a0fb5cef8df2b5b
|
|
4
|
+
data.tar.gz: 392a09d98c60d8187fd705f543c28eafab6784cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b1170d9365135f740d104d1d93420845bc1d84959f94c945dc47089e952946c1dd8b7fb30e2f77720abb2f463cf8f81792b6345c5dc02b0a8826e858212ba7d
|
|
7
|
+
data.tar.gz: 4a43af667e774dcddb5ffe6de3ea78180b26ef13c9b006f42ed08de1f9b7592538c5bf464477ad6f0c0a03bca122b863ff4aa38d616ba4243e6e0ea5981998ee
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
��f�w⸜s~kmt{�?� oj�4�������F�&\��x\K�_X�L��M�
|
|
1
|
+
z`@�<H�V��K���1&_Z�^� �ϭ�uRG�Ez'}]߾�_��o^�|����&Ѱ�
|
|
2
|
+
@�2��)˺nq�+�-{֒�4Q��7sb��jL"�y�;1NYˀ.��xϰ��ǀ�HHʯJ�2����4�V�6�m� �d���c-��#���9J^&t·Gj"�U�sT�k!xH����V�?�+�T%���g���#Fe���>��f6!3)�({�x5�
|
data/lib/martile.rb
CHANGED
|
@@ -8,6 +8,7 @@ require 'dynarex'
|
|
|
8
8
|
require 'rdiscount'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
# feature: 27-Sep-2014: A smartlink can now be used e.g. ?link http://someurl?
|
|
11
12
|
# feature: 24-Sep-2014: A kind of markdown list can now be created inside
|
|
12
13
|
# of <ol> or <ul> tags
|
|
13
14
|
# bug fix: 16-Apr-2014: Words containing an underscore should no longer be
|
|
@@ -76,9 +77,11 @@ class Martile
|
|
|
76
77
|
#puts 's7 : ' + s7.inspect
|
|
77
78
|
|
|
78
79
|
s8 = apply_filter(s7) {|x| underline x }
|
|
80
|
+
s9 = apply_filter(s8) {|x| smartlink x }
|
|
81
|
+
|
|
79
82
|
#puts 's8 : ' + s8.inspect
|
|
80
83
|
|
|
81
|
-
@to_html =
|
|
84
|
+
@to_html = s9
|
|
82
85
|
end
|
|
83
86
|
|
|
84
87
|
private
|
|
@@ -202,6 +205,7 @@ class Martile
|
|
|
202
205
|
end
|
|
203
206
|
|
|
204
207
|
def table_to_html(s)
|
|
208
|
+
|
|
205
209
|
# create any tables
|
|
206
210
|
s.gsub!(/^\[[^|]+\|[^\n]+\n\|[^\]]+\]/) do |x|
|
|
207
211
|
|
|
@@ -232,4 +236,8 @@ class Martile
|
|
|
232
236
|
|
|
233
237
|
end
|
|
234
238
|
|
|
239
|
+
def smartlink(s)
|
|
240
|
+
s.gsub(/\B\?([^\n]+) +(https?:\/\/[^\b]+)\?\B/,'[\1](\2)')
|
|
241
|
+
end
|
|
242
|
+
|
|
235
243
|
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.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
YF3JmVOebtMx3b9sXkLX1YyX0fsg59FXvg9CVfAoaG6qjG2Y/okBwMSqqMLQiiao
|
|
32
32
|
aRfEuwOkM9Z+zA==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2014-09-
|
|
34
|
+
date: 2014-09-27 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rexle-builder
|
metadata.gz.sig
CHANGED
|
Binary file
|