Skip to content

Commit c6c0093

Browse files
committed
Force usage of URL syntax in AttributedStringGenerator.
1 parent 1c97c6c commit c6c0093

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/MarkdownKit/AttributedString/AttributedStringGenerator.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,11 @@ open class AttributedStringGenerator {
119119
let titleAttr = title == nil ? "" : " title=\"\(title!)\""
120120
if let uriStr = uri {
121121
let url = URL(string: uriStr)
122-
Swift.print("=== URL0 = \(url?.absoluteString ?? "none"), \(url?.scheme == nil), \(self.outer == nil)")
123122
if (url?.scheme == nil) || (url?.isFileURL ?? false),
124123
let baseUrl = self.outer?.imageBaseUrl {
125124
let url = URL(fileURLWithPath: uriStr, relativeTo: baseUrl)
126-
Swift.print(" URL2 = \(url.absoluteString)")
127125
if url.isFileURL {
128-
return "<img src=\"\(url.absoluteURL.path)\"" +
126+
return "<img src=\"\(url.absoluteString)\"" +
129127
" alt=\"\(text.rawDescription)\"\(titleAttr)/>"
130128
}
131129
}

0 commit comments

Comments
 (0)