We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 233c132 commit 7752104Copy full SHA for 7752104
lib/pebble_documentation_pebblekit_android.rb
@@ -196,12 +196,16 @@ def name_to_url(name)
196
197
def process_html(html, root)
198
contents = Nokogiri::HTML(html)
199
- contents.css('a').each do | link |
200
- next if link['href'].nil?
201
-
202
- href = File.expand_path(link['href'], root)
203
- href = href.sub('/com/com/', '/com/')
204
- href = href.sub('.html', '/')
+ contents.css('a').each do |link|
+ href = link['href']
+ next if href.nil?
+
+ unless href.start_with?('https://')
+ href = "../#{href}" unless href.start_with?('#')
205
+ href = File.expand_path(href, root)
206
+ .sub('/com/com/', '/com/')
207
+ .sub('.html', '/')
208
+ end
209
link['href'] = href
210
end
211
contents.css('.memberSummary caption').remove
0 commit comments