asciibuild 0.4.0 → 0.5.0
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
- data/lib/asciibuild/extensions.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c30824fc02df2f417b338f1009740077fcb7d9
|
4
|
+
data.tar.gz: 98f4fdaaaacd26c26ef375dd99a117f21a8ac4ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ce5ac3266186050381a94ad654102847f522a0c9109aca74616d88dc0eae2480ba219549f5a4492892cd4ac8d7275547c5d0964e0353685597517e9f65b2bf4
|
7
|
+
data.tar.gz: 779badcf11c72d88359a2088beeb1d52f7e79b9cc687381258d73010b0c885a5bf4eb38634008a973c0faf4cc6371eb2de4f5a1055a1d1a7b2941ce95a5c1fde
|
@@ -50,12 +50,13 @@ def write_file attrs, default_name, body
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
def
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
def normalize parent, attrs, lines
|
54
|
+
redact = parent.document.attributes['redact']
|
55
|
+
patts = if redact
|
56
|
+
if redact.class == Array
|
57
|
+
redact
|
57
58
|
else
|
58
|
-
[
|
59
|
+
[redact]
|
59
60
|
end
|
60
61
|
else
|
61
62
|
[]
|
@@ -66,7 +67,7 @@ def redact parent, attrs, lines
|
|
66
67
|
patts.each do |p|
|
67
68
|
l = l.gsub(Regexp.new(p), "[****]")
|
68
69
|
end
|
69
|
-
new_lines << l
|
70
|
+
new_lines << l.gsub(/\e\[([;\d]+)?m/, '') # Sneak in ANSI color stripping here as well
|
70
71
|
end
|
71
72
|
new_lines
|
72
73
|
end
|
@@ -164,7 +165,6 @@ module Asciibuild
|
|
164
165
|
# If using a language like BASH or Python, the language's interpreter should accept `STDIN` as
|
165
166
|
# input and be found in the `PATH`.
|
166
167
|
|
167
|
-
|
168
168
|
use_dsl
|
169
169
|
named :asciibuild
|
170
170
|
on_context :listing
|
@@ -297,7 +297,7 @@ module Asciibuild
|
|
297
297
|
attrs['title'] = 'icon:check-circle[role=green] ' + attrs['title']
|
298
298
|
end
|
299
299
|
|
300
|
-
after_end cmd, parent,
|
300
|
+
after_end cmd, parent, normalize(parent, attrs, lines), attrs
|
301
301
|
end
|
302
302
|
|
303
303
|
end
|