…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 | 7 | result[:store_path] = store_path |
| 8 | 8 | |
| 9 | 9 | css('a').each do |link| |
| 10 | − next unless (href = link['href']) && relative_url_string?(href) | |
| 11 | − link['href'] = normalize_href(href) | |
| 10 | + href = link['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 | 15 | end |
| 13 | 16 | |
| 14 | 17 | doc |