martile 0.5.4 → 0.5.5
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 +0 -0
- data/lib/martile.rb +12 -1
- metadata +1 -1
- 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: ea4f12176f1cff0764da037483033aa613e1c2fc
|
4
|
+
data.tar.gz: beaa6bd47586fe4b05151f5cfe3e952f01f7b565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50169a9c2fbbea01c982450f0d3f339b7e19e222017eab87cb526e70c80422334195f0adc90dc145c5b5d43668709aafc62d553de548df65f02deacc9103a336
|
7
|
+
data.tar.gz: 1e76c601d3d7a1543ed3f8d46d9fe625b81d5d4ce4dba069229fa000d2be11fbb416ef2517dc58e17b176fe196ac347bec45570d999affdc3754e0e8af28c3d6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/martile.rb
CHANGED
@@ -10,6 +10,7 @@ require 'rdiscount'
|
|
10
10
|
|
11
11
|
# bug fix: 20-Mar-2015: HTML and XML elements should not be filtered out of
|
12
12
|
# the section() method
|
13
|
+
# feature: Added the unicode checkbox feature from the Mtlite gem
|
13
14
|
# bug fix: 14-Mar-2015: A section can now be
|
14
15
|
# written without an error occurring
|
15
16
|
# bug fix: 11-Mar-2015: Escapes angle brackets within a code block *before*
|
@@ -90,10 +91,12 @@ class Martile
|
|
90
91
|
s9 = apply_filter(s8) {|x| smartlink x }
|
91
92
|
#s10 = apply_filter(s9) {|x| section x }
|
92
93
|
s10 = section s9
|
94
|
+
|
95
|
+
s11 = apply_filter(s10) {|x| mtlite_utils x }
|
93
96
|
|
94
97
|
#puts 's8 : ' + s8.inspect
|
95
98
|
|
96
|
-
@to_html =
|
99
|
+
@to_html = s11
|
97
100
|
end
|
98
101
|
|
99
102
|
private
|
@@ -222,6 +225,14 @@ class Martile
|
|
222
225
|
|
223
226
|
end
|
224
227
|
|
228
|
+
def mtlite_utils(s)
|
229
|
+
|
230
|
+
# convert square brackets to unicode check boxes
|
231
|
+
# replaces a [] with a unicode checkbox,
|
232
|
+
# and [x] with a unicode checked checkbox
|
233
|
+
s.gsub(/\[\s*\]/,'☐').gsub(/\[x\]/,'☑')
|
234
|
+
end
|
235
|
+
|
225
236
|
def ordered_list_to_html(s)
|
226
237
|
list_to_html s, '#'
|
227
238
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|