File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -96,32 +96,7 @@ def run_extractors
96
96
# MODIFIED: Dig URLs from elements other than "A" refs
97
97
#
98
98
def links
99
- return @links if @links
100
- @links = [ ]
101
- return @links if !doc
102
-
103
- @links = run_extractors
104
-
105
- @links |= @links . map do |u |
106
- # back-off to the parent dir
107
- to_absolute ( URI ( u . path . gsub ( /(.*\/ )[^\/ ]+$/ , "\\ 1" ) ) ) rescue next
108
- end . uniq . compact
109
-
110
- nlinks = [ ]
111
- @links . each do |u |
112
- bits = u . path . split ( '/' )
113
- while ( bits . length > 0 )
114
- bits . pop
115
- j = bits . join ( '/' )
116
- j = '/' if j . empty?
117
- nlinks << to_absolute ( URI ( j ) ) rescue next
118
- end
119
- end
120
- @links |= nlinks
121
-
122
- @links . flatten!
123
- @links . uniq!
124
- @links
99
+ @links ||= run_extractors
125
100
end
126
101
127
102
#
You can’t perform that action at this time.
0 commit comments