Skip to content

Commit

Permalink
Merge pull request #4 from brightdigit/shendy/v1.0.0/fix/featuredImag…
Browse files Browse the repository at this point in the history
…e/double-slash

fix: replace of // with / of feature image url path
  • Loading branch information
leogdion authored Jul 27, 2023
2 parents 4983fd9 + 4347bd4 commit bff9c9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/ContributeWordPress/WordPressMarkdownProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public struct WordPressMarkdownProcessor<
// From the list of images attached to this post,
// choose the first one as featuredImage
let featuredImagePath = assets.first { $0.parentID == post.ID }.map {
["", assetRoot, $0.newPath].joined(separator: "/")
["", assetRoot, $0.newPath]
.joined(separator: "/")
.replacingOccurrences(of: "//", with: "/")
}

_ = try self.contentBuilder.write(
Expand Down

0 comments on commit bff9c9c

Please sign in to comment.