Fix external links in related content

This commit is contained in:
Christoph Hagen 2024-03-08 17:09:29 +01:00
parent ddf489c2c4
commit aa97a738b4

View File

@ -432,7 +432,7 @@ extension Element {
- Returns: The relative url from a localized page of the element to the target file.
*/
func relativePathToOtherSiteElement(file: String) -> String {
guard !file.hasPrefix("/") else {
guard !file.hasPrefix("/"), !file.hasPrefix("https://"), !file.hasPrefix("http://") else {
return file
}
// Note: The element `path` is missing the last component