…so links inside SVGs, such as those in Rust's railroad diagrams, can work properly.
Unified · Split
| @@ -7,8 +7,11 @@ module Docs · 6 unmodified lines | |||
| 7 | result[:store_path] = store_path | 7 | result[:store_path] = store_path |
| 8 | 8 | ||
| 9 | css('a').each do |link| | 9 | css('a').each do |link| |
| 10 | next unless (href = link['href']) && relative_url_string?(href) | 10 | href = link['href'] |
| 11 | link['href'] = normalize_href(href) | 11 | link['href'] = normalize_href(href) if href && relative_url_string?(href) |
| 12 | |||
| 13 | xlink_href = link['xlink:href'] | ||
| 14 | link['xlink:href'] = normalize_href(xlink_href) if xlink_href && relative_url_string?(xlink_href) | ||
| 12 | end | 15 | end |
| 13 | 16 | ||
| 14 | doc | 17 | doc |