martile 0.5.10 → 0.5.11
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/lib/martile.rb +11 -4
- data.tar.gz.sig +0 -0
- 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: 4f5aa2a91b9258fa609b6e9bb08aca5d91dd570d
|
|
4
|
+
data.tar.gz: ca4e379f7d992f9545c32e7f492e0c4f01357d66
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f9c137dc7bad47c8b026aff236bf3567650bdff10738875067fa1205c9d91773838d19b452a46b4bf4951255f753f6f87d4f9bac515524b256317c66a1049de
|
|
7
|
+
data.tar.gz: 5f7f90fe348ccc0d175270f7f7e5430da19429076b31aae84a124b1e6fd353ee87c4bb7ef2631d2cd1e25a08d75faa12b2c364e78b4c27cb1dff51a0c0af20f7
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/martile.rb
CHANGED
|
@@ -8,6 +8,7 @@ require 'dynarex'
|
|
|
8
8
|
require 'rdiscount'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
# feature: 29-Mar-2015: Borrowed the strikethru feature from Mtlite
|
|
11
12
|
# bug fix: 28-Mar-2015: Fixes a bug introduced on the 20-Mar-2015 relating to
|
|
12
13
|
# Markdown lists not being converted to HTML
|
|
13
14
|
# see http://www.jamesrobertson.eu/bugtracker/2015/mar/28/markdown-lists-are-not-converted-to-html.html
|
|
@@ -242,14 +243,20 @@ class Martile
|
|
|
242
243
|
# and [x] with a unicode checked checkbox
|
|
243
244
|
s2 = s.gsub(/\s\[\s*\]\s/,' ☐ ').gsub(/\s\[x\]\s/,' ☑ ')
|
|
244
245
|
|
|
245
|
-
s2.gsub(/(?:^\[|\s\[)[^\]]+\]\((https?:\/\/[^\s]+)/) do |x|
|
|
246
|
+
s3 = s2.gsub(/(?:^\[|\s\[)[^\]]+\]\((https?:\/\/[^\s]+)/) do |x|
|
|
246
247
|
|
|
247
248
|
next x if @ignore_domainlabel and x[/#{@ignore_domainlabel}/]
|
|
248
249
|
|
|
249
|
-
|
|
250
|
-
r =
|
|
250
|
+
a = x[/https?:\/\/([^\/]+)/,1].split(/\./)
|
|
251
|
+
r = a.length >= 3 ? a[1..-1] : a
|
|
251
252
|
"%s<span class='domain'>[%s]</span>" % [x, r.join('.')]
|
|
252
|
-
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# add strikethru to completed items
|
|
256
|
+
# e.g. -milk cow- becomes <del>milk cow</del>
|
|
257
|
+
s3.gsub(/\s-[^-]+-?[^-]+-[\s\]]/) do |x|
|
|
258
|
+
x.sub(/-([&\w]+.*\w+)-/,'<del>\1</del>')
|
|
259
|
+
end
|
|
253
260
|
|
|
254
261
|
end
|
|
255
262
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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
|
+
version: 0.5.11
|
|
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-03-
|
|
34
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rdiscount
|
metadata.gz.sig
CHANGED
|
Binary file
|