martile 0.6.29 → 0.6.30
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 +8 -21
- metadata +4 -4
- 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: a883444aeb334dee25fc9b4acaf6d342bf05c024
|
|
4
|
+
data.tar.gz: 007effbafb1d0deafe2fae5d55880ee45f070a88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e35bd3808d3b300634d12e5e54a629b1781344da971436845ed7d8ead193fc03a3595a3078d7b37bf13ab7e4e00cbc43261b21c19f984d34aafbea6d9683360
|
|
7
|
+
data.tar.gz: d243a38f7016c6905cd8943e8675aa68b03fe5df4fa5c9d37c9336a8b94b71bf9a7e2bb069b6bb44a5920a9be95d4bca3a234fcb2772be60153da873937001d3
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/martile.rb
CHANGED
|
@@ -9,6 +9,7 @@ require 'rdiscount'
|
|
|
9
9
|
require 'kvx'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
# bug fix: 29-Jan-2017 2 or more code listings should now be parsed correctly
|
|
12
13
|
# feature: 24-Jun-2016 links containing a right parenthesis at the
|
|
13
14
|
# end are no longer cropped
|
|
14
15
|
# bug fix: 11-Jun-2016 pre tags are now filtered out properly
|
|
@@ -153,30 +154,16 @@ class Martile
|
|
|
153
154
|
|
|
154
155
|
if s2[0] != '<' then
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
s.lines.chunk {|x| x =~ /^\n|^ |\n/ }.map do |_, x|
|
|
157
158
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if r.join.strip.length > 0 then
|
|
164
|
-
raw_code = a.shift(r.length).map{|x| x.sub(/^ {4}/,'')}.join
|
|
165
|
-
|
|
166
|
-
code_block = "<pre><code>%s</code></pre>\n" % escape(raw_code)
|
|
167
|
-
|
|
168
|
-
b << code_block
|
|
169
|
-
s2 = a.join
|
|
170
|
-
i = r.length
|
|
171
|
-
else
|
|
172
|
-
i = (s =~ /^ {4}/)
|
|
159
|
+
if x.join.lstrip[/ /] then
|
|
160
|
+
"\n<pre><code>%s</code></pre>\n" % escape(x.join.gsub(/^ {4}/,''))
|
|
161
|
+
else
|
|
162
|
+
x.join
|
|
173
163
|
end
|
|
174
164
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
b.join + s2
|
|
165
|
+
end.join
|
|
166
|
+
|
|
180
167
|
else
|
|
181
168
|
s2
|
|
182
169
|
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.
|
|
4
|
+
version: 0.6.30
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
fHJRwdYS8tvLYH9UFytJxDKjlovBuFUsfKP0FJlZGQGJM5JiIj5LWelTGJtJD8hI
|
|
32
32
|
2jPlwrOtiqZt2A==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date:
|
|
34
|
+
date: 2017-01-29 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rdiscount
|
|
@@ -94,7 +94,7 @@ dependencies:
|
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
95
|
version: 0.5.11
|
|
96
96
|
description:
|
|
97
|
-
email: james@
|
|
97
|
+
email: james@jamesrobertson.eu
|
|
98
98
|
executables: []
|
|
99
99
|
extensions: []
|
|
100
100
|
extra_rdoc_files: []
|
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
122
|
rubyforge_project:
|
|
123
|
-
rubygems_version: 2.
|
|
123
|
+
rubygems_version: 2.6.8
|
|
124
124
|
signing_key:
|
|
125
125
|
specification_version: 4
|
|
126
126
|
summary: Martile is a Markdown pre formatter which is designed to format custom Markdown
|
metadata.gz.sig
CHANGED
|
Binary file
|