martile 0.5.4 → 0.5.5

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: f1924d22b3ad3c26f1f690f74ec604ed3cce7327
4
- data.tar.gz: 8f60a1e736ed705019c0e5b39cd5ee3cc6754f87
3
+ metadata.gz: ea4f12176f1cff0764da037483033aa613e1c2fc
4
+ data.tar.gz: beaa6bd47586fe4b05151f5cfe3e952f01f7b565
5
5
  SHA512:
6
- metadata.gz: 24630f8d0c6b3243de2a2fdf48495480cfb086353157ec9309bfc8a00eeb4ae426f4d44cb32479b0bc0ebd529005cfcbc257b210acac3db7dc443f2d01ccc6f6
7
- data.tar.gz: 58dd39ffa23da8709aff3682dda184b9c410ef9d4c8d780e20941360d2d998c4f88ea3a4f0cab751d3c5d7edcaea91c753b87b734651672518fc805b4cc66ccb
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 = s10
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: martile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file