anatomy 0.2.15 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b6b6079c0e9d6e69e0a52c1d76f226380d9cf19
4
- data.tar.gz: bf31018089794f2d0ae947c76ad7e409d84ff7d9
3
+ metadata.gz: a9e27adc27d4ce9b9e27255abbfc61595a64dfaa
4
+ data.tar.gz: d79a01d68b3b69f84ff9e485bb18ffec9ee7f43d
5
5
  SHA512:
6
- metadata.gz: 3562e8776f444865466bc810db7c7686af8aa31a5be508cf694153ed0f0a0907c02df50fb058558cf3ca52aac438822d779f33c17b2ecab6882c997899a809c9
7
- data.tar.gz: f96a6ef0035a5f07eff199f776d65fe1a89cb13b7fd5d1c3d6982845954fda182878e91fda3ebaf1cfafd2b7dedb0605174a8f5b33e1594b6fab182ed518f19a
6
+ metadata.gz: 336103723169c1c4e832b7bd840f7585baae69b7085305c40d11bd9eecba71bde1856b2bdd7d157c3003801796d5058007f7232326d58e5927428ff6af829d10
7
+ data.tar.gz: 350aa961918fb5886cb70b46760ae73b7ffd5df83f077bb83b390a924173092e3097de3ae1c28cd1bd3c4e375432a63d57bdc137014d13a21b4c93c3960fb830
data/lib/anatomy/base.ay CHANGED
@@ -36,6 +36,11 @@ def(title(content, tag-name = data sanitize(content), *extra-tag-names)):
36
36
  .header(part page-depth + 1)))
37
37
  ]
38
38
 
39
+ def(inline-sections):
40
+ data MetaBlock new(
41
+ [part]:
42
+ part style properties << .inline-sections)
43
+
39
44
  def(split-sections):
40
45
  data MetaBlock new(
41
46
  [part]:
data/lib/anatomy/data.ay CHANGED
@@ -105,14 +105,22 @@ def(Part set-tag(name, target = .self, display = nil)):
105
105
  def(Part set-local-tag(name, target = nil, display = nil)):
106
106
  @local-tags[name] = Tag new(self, name, target, display)
107
107
 
108
- def(Part split-sections?): style properties include?(.split-sections)
108
+ def(Part inline-sections?):
109
+ style properties include?(.inline-sections)
109
110
 
110
- def(Part toc?): style properties include?(.toc)
111
+ def(Part inlined?):
112
+ inline-sections? || (@parent && @parent inlined?)
113
+
114
+ def(Part split-sections?):
115
+ style properties include?(.split-sections)
116
+
117
+ def(Part toc?):
118
+ style properties include?(.toc)
111
119
 
112
120
  def(Part page-depth):
113
121
  if(@parent)
114
122
  then:
115
- if(@parent split-sections?)
123
+ if(@parent split-sections? || @parent inline-sections?)
116
124
  then: 0
117
125
  else: @parent page-depth + 1
118
126
  else:
@@ -197,7 +205,7 @@ def(content?(_)): false
197
205
  def(sanitize(x)):
198
206
  contents-of(x) gsub(r" & ", " and ")
199
207
  gsub(r"\s+", "-")
200
- gsub(r"[^[:alnum:]_\-:.]", "")
208
+ gsub(r"[^[:alnum:]_\-]", "")
201
209
  downcase
202
210
 
203
211
  def(contents-of(s & String)): s
@@ -201,11 +201,10 @@ def(filename(p)): p tag name + ".html"
201
201
 
202
202
  def(top(p)):
203
203
  condition:
204
- (p parent && p parent split-sections?):
205
- p
206
-
207
204
  p parent:
208
- top(p parent)
205
+ if(p parent split-sections? && !(p parent inlined?))
206
+ then: p
207
+ else: top(p parent)
209
208
 
210
209
  otherwise:
211
210
  p
@@ -357,7 +356,7 @@ def(render-part(part, out = ".")):
357
356
  <div(.section, id = i"section_#{part tag name}"):
358
357
  over(part body)
359
358
 
360
- if(part split-sections?)
359
+ if(part split-sections? && !(part inlined?))
361
360
  then:
362
361
  part parts collect [sub]:
363
362
  render(sub, out)
@@ -1,3 +1,3 @@
1
1
  module Anatomy
2
- VERSION = "0.2.15"
2
+ VERSION = "0.2.16"
3
3
  end
metadata CHANGED
@@ -1,67 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anatomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
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-28 00:00:00.000000000 Z
11
+ date: 2016-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ prerelease: false
14
15
  name: atomy
15
16
  type: :runtime
16
- requirement: !ruby/object:Gem::Requirement
17
+ version_requirements: !ruby/object:Gem::Requirement
17
18
  requirements:
18
19
  - - "~>"
19
20
  - !ruby/object:Gem::Version
20
21
  version: 0.6.3
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
22
+ requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.6.3
27
27
  - !ruby/object:Gem::Dependency
28
+ prerelease: false
28
29
  name: broomhlda
29
30
  type: :runtime
30
- requirement: !ruby/object:Gem::Requirement
31
+ version_requirements: !ruby/object:Gem::Requirement
31
32
  requirements:
32
33
  - - "~>"
33
34
  - !ruby/object:Gem::Version
34
35
  version: 0.2.0
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
36
+ requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
+ prerelease: false
42
43
  name: json_pure
43
44
  type: :runtime
44
- requirement: !ruby/object:Gem::Requirement
45
+ version_requirements: !ruby/object:Gem::Requirement
45
46
  requirements:
46
47
  - - "~>"
47
48
  - !ruby/object:Gem::Version
48
49
  version: '1.8'
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
50
+ requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.8'
55
55
  - !ruby/object:Gem::Dependency
56
+ prerelease: false
56
57
  name: rake
57
58
  type: :development
58
- requirement: !ruby/object:Gem::Requirement
59
+ version_requirements: !ruby/object:Gem::Requirement
59
60
  requirements:
60
61
  - - "~>"
61
62
  - !ruby/object:Gem::Version
62
63
  version: '10.4'
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project: anatomy
122
- rubygems_version: 2.5.1
122
+ rubygems_version: 2.6.2
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Anatomy documentation system