asciibuild 0.2.0 → 0.3.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 +13 -4
- 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: 1a6bfa059dad0c3bff1d25fc23bccaa19921072c
|
4
|
+
data.tar.gz: e2da6451f981f2c3efdfcc095aa0a085c0f712ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f19b35ba2a027507e2fe0025fcbc15f07965d53e7975a1918f65704c95c949d40f5913daf0babaa670f9d30853d562850e4f006e8747d0424b8a97d938fe719d
|
7
|
+
data.tar.gz: 425b4331f57f3eb908995531d1970fa66ab01d0db7b5655004dab74a10dc5db6b4fa5cb9dca45c23ad9e6c3a0673ab12bdc3a3d200480f2ccb8e8ef99f35746c
|
@@ -10,14 +10,19 @@ def include_section? parent, attrs
|
|
10
10
|
[]
|
11
11
|
end
|
12
12
|
|
13
|
+
deps = []
|
14
|
+
|
13
15
|
incl_sect = sections.empty?
|
14
16
|
sections.each do |s|
|
15
|
-
if not incl_sect
|
16
|
-
|
17
|
+
if not incl_sect
|
18
|
+
if Regexp.new(s) =~ parent.title
|
19
|
+
incl_sect = true
|
20
|
+
deps << "Before " + parent.title << "After " + parent.title
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
19
24
|
|
20
|
-
incl_sect or (not parent.document.attributes["error"]
|
25
|
+
incl_sect or deps.include?(parent.title) or (not parent.document.attributes["error"])
|
21
26
|
end
|
22
27
|
|
23
28
|
def get_lang lang
|
@@ -182,7 +187,11 @@ module Asciibuild
|
|
182
187
|
return create_open_block parent, ["[source,#{lang}]", "----"] + reader.lines + ["----"], attrs
|
183
188
|
end
|
184
189
|
|
185
|
-
body =
|
190
|
+
body = if not attrs['template'] == 'false'
|
191
|
+
Mustache.render(reader.read, parent.document.attributes)
|
192
|
+
else
|
193
|
+
reader.read
|
194
|
+
end
|
186
195
|
|
187
196
|
lines = []
|
188
197
|
stderr_lines = []
|