mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-08 00:09:31 +00:00
14 lines
239 B
Swift
14 lines
239 B
Swift
|
import SwiftSoup
|
||
|
import HTML2Markdown
|
||
|
|
||
|
extension Status {
|
||
|
public var contentAsMarkdown: String {
|
||
|
do {
|
||
|
let dom = try HTMLParser().parse(html: content)
|
||
|
return dom.toMarkdown()
|
||
|
} catch {
|
||
|
return content
|
||
|
}
|
||
|
}
|
||
|
}
|