brief 1.8.10 → 1.8.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/brief/document/section/builder.rb +7 -1
- data/lib/brief/document/structure.rb +5 -1
- data/lib/brief/version.rb +1 -1
- 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: 3de7498537562e1af987a1dde8f953ac597e43bf
|
4
|
+
data.tar.gz: 485d59167686ab6a22fc7c21692e6c0fdb55dcee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602e813382b61bb65234e80162d2cc02dbce676e11529b2b9e89471f0a4486c481907482bc7d9e12310da18303b88a77f4f343e422524d4f6f3a881bbfab4a88
|
7
|
+
data.tar.gz: 72737aded296ed97a129db549f5a46d19e08428373a2434cab50094df9fd5c5a4982909a70d692ea984691c710f3a30f514be147cb42f7ee6c06a05a37e7b7bd
|
data/Gemfile.lock
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
class Brief::Document::Section
|
2
|
+
BuilderError = Class.new(Exception)
|
3
|
+
|
2
4
|
class Builder
|
3
5
|
def self.run(source, options = {})
|
4
6
|
new(source, options).to_fragment
|
@@ -17,7 +19,11 @@ class Brief::Document::Section
|
|
17
19
|
@nodes = []
|
18
20
|
@cycles = 0
|
19
21
|
|
20
|
-
|
22
|
+
begin
|
23
|
+
run
|
24
|
+
rescue
|
25
|
+
raise BuilderError
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
def run
|
@@ -87,7 +87,11 @@ module Brief
|
|
87
87
|
[level, [fragment]]
|
88
88
|
end
|
89
89
|
|
90
|
-
|
90
|
+
begin
|
91
|
+
self.fragment = Brief::Document::Section::Builder.run(mapping, low: lowest_level, high: highest_level)
|
92
|
+
rescue Brief::Document::Section::BuilderError
|
93
|
+
@fragment
|
94
|
+
end
|
91
95
|
end
|
92
96
|
|
93
97
|
def levels
|
data/lib/brief/version.rb
CHANGED