aspec_rb 0.0.15 → 0.0.16
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/aspec_rb/version.rb +1 -1
- data/lib/extensions/autoxrefs.rb +17 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81629ea54e2cfed1b38309c4f2cef083a4b174c199f801f2f43db23a1a8db1c0
|
4
|
+
data.tar.gz: d97546374ffc196faa146acb0117d35f020250a39ce659f67aa5a5188af13f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474bd5d638e8eebd902d3b8bc0dbd4aabc9bda65fc4667e1a8e1be1c5135d01e5f2abc880d16c3dce8c55481f4ed08f912cf8badda361c3f643ed81c9e15ae2f
|
7
|
+
data.tar.gz: c6f33e16bdd177198faa7571ac6297eb2714fb560c2955ed37d301249552be52953fa37e4b4125f0fb39cbc078a799450f367aa4d44ffa95968dce05826bb381
|
data/Gemfile.lock
CHANGED
data/lib/aspec_rb/version.rb
CHANGED
data/lib/extensions/autoxrefs.rb
CHANGED
@@ -118,15 +118,24 @@ end
|
|
118
118
|
doclinks += o_anchors
|
119
119
|
doclinks.uniq!
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
filename = parent if childpath == path
|
124
|
-
[anchor, path, filename, text, chapter, main, _h1]
|
125
|
-
}
|
126
|
-
end
|
127
|
-
|
128
|
-
anchors.uniq!
|
121
|
+
# Edit the array of Anchors to point to the parent document *if* it is included.
|
122
|
+
# TODO use a while loop, repeat until no changes made
|
129
123
|
tempanchors = []
|
124
|
+
3.times do
|
125
|
+
tempanchors.clear
|
126
|
+
|
127
|
+
# Loop through all includes, if the anchor is contained in an include,
|
128
|
+
# edit the anchors array to point to its parent instead
|
129
|
+
includes.each do |parent, _child, childpath|
|
130
|
+
anchors.delete_if do |anchor, path, filename, text, chapter, main, _h1|
|
131
|
+
next unless Sform.trim(childpath) == Sform.trim(filename)
|
132
|
+
tempanchors.push([anchor, path, Sform.trim(parent), text, chapter, main])
|
133
|
+
true
|
134
|
+
end
|
135
|
+
end
|
136
|
+
anchors += tempanchors
|
137
|
+
anchors.uniq!
|
138
|
+
end
|
130
139
|
|
131
140
|
anchors.delete_if do |anchor, apath, trim_parent, parent, amain, achapter|
|
132
141
|
doclinks.each do |doc, link, dchapter|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspec_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tcob
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|