Insert more line breaks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
struct FeedEntry {
|
||||
struct FeedEntry: HtmlProducer {
|
||||
|
||||
private let data: FeedEntryData
|
||||
|
||||
@@ -12,8 +12,8 @@ struct FeedEntry {
|
||||
data.link != nil ? " linked-card" : ""
|
||||
}
|
||||
|
||||
var content: String {
|
||||
var result = "<article><div class='card\(cardLinkClassText)'>"
|
||||
func populate(_ result: inout String) {
|
||||
result += "<article><div class='card\(cardLinkClassText)'>"
|
||||
switch data.media {
|
||||
case .images(let images):
|
||||
ImageGallery(id: data.entryId, images: images).populate(&result)
|
||||
@@ -41,7 +41,6 @@ struct FeedEntry {
|
||||
if let url = data.link {
|
||||
result += "<div class='link-center'><div class='link'>\(url.text)</div></div>"
|
||||
}
|
||||
result += "</div></div></article>" // Closes card-content, card, article
|
||||
return result
|
||||
result += "</div></div></article>\n" // Closes card-content, card, article
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user