anatomy 0.2.6 → 0.2.7
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/anatomy/base.ay +6 -0
- data/lib/anatomy/data.ay +2 -0
- data/lib/anatomy/renderers/html.ay +9 -6
- data/lib/anatomy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8bd164380607baf3afe9c067472e0031083fed64
|
|
4
|
+
data.tar.gz: 6d495bd0291c600e20615e2b07cfa91bc7e86da5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 968bba17c98053fc513f12ea285f654a1c5b0a6df10249986943e39b64936f9373bde69e10bd0db77e7a5c8b5ac59b59cf3752d42457a1260edee114bded5dbc
|
|
7
|
+
data.tar.gz: 49998d10fe5426aa5954d905159065ab45c04368648497d820b1b54892ab465b9b4b5747d3e8fda1d97403fffce637b2e4a563babc15260146ca2f78340a8a21
|
data/lib/anatomy/base.ay
CHANGED
|
@@ -24,9 +24,15 @@ def(title(content, tag-name = data sanitize(content), *extra-tag-names)):
|
|
|
24
24
|
extra-tag-names each [t]:
|
|
25
25
|
part set-tag(t))
|
|
26
26
|
|
|
27
|
+
def(split-sections):
|
|
28
|
+
data MetaBlock new(
|
|
29
|
+
[part]:
|
|
30
|
+
part style properties << .split-sections)
|
|
31
|
+
|
|
27
32
|
def(table-of-contents):
|
|
28
33
|
data MetaBlock new(
|
|
29
34
|
[part]:
|
|
35
|
+
part style properties << .split-sections
|
|
30
36
|
part style properties << .toc)
|
|
31
37
|
|
|
32
38
|
def(mobile-optimized):
|
data/lib/anatomy/data.ay
CHANGED
|
@@ -82,6 +82,8 @@ def(Part set-tag(name, target = .self, display = nil)):
|
|
|
82
82
|
def(Part set-local-tag(name, target = nil, display = nil)):
|
|
83
83
|
@local-tags[name] = Tag new(self, name, target, display)
|
|
84
84
|
|
|
85
|
+
def(Part split-sections?): style properties include?(.split-sections)
|
|
86
|
+
|
|
85
87
|
def(Part toc?): style properties include?(.toc)
|
|
86
88
|
|
|
87
89
|
def(Part section-label):
|
|
@@ -201,7 +201,7 @@ def(filename(p)): p tag name + ".html"
|
|
|
201
201
|
|
|
202
202
|
def(top(p)):
|
|
203
203
|
condition:
|
|
204
|
-
(p parent && p parent
|
|
204
|
+
(p parent && p parent split-sections?):
|
|
205
205
|
p
|
|
206
206
|
|
|
207
207
|
p parent:
|
|
@@ -353,12 +353,15 @@ def(render-part(part, out = ".", depth = 1)):
|
|
|
353
353
|
|
|
354
354
|
over(part body)
|
|
355
355
|
|
|
356
|
-
if(part
|
|
356
|
+
if(part split-sections?)
|
|
357
357
|
then:
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
358
|
+
part parts collect [sub]:
|
|
359
|
+
render(sub, out)
|
|
360
|
+
|
|
361
|
+
when(part toc?):
|
|
362
|
+
<ol(.toc, #table-of-contents):
|
|
363
|
+
part parts collect [sub]:
|
|
364
|
+
toc-leaf(part, sub)
|
|
362
365
|
else:
|
|
363
366
|
part parts collect [sub]:
|
|
364
367
|
render-part(sub, out, depth + 1)
|
data/lib/anatomy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anatomy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Suraci
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: atomy
|