2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

fix: ActiveLabel not respect paragraph tag issue

This commit is contained in:
CMK 2021-07-22 13:06:22 +08:00
parent ccd26c144f
commit 681f78856a

@ -29,7 +29,7 @@ public enum MastodonStatusContent {
public static func parse(content: String, emojiDict: EmojiDict) throws -> MastodonStatusContent.ParseResult {
let document: String = {
var content = content
var content = content.replacingOccurrences(of: "</p>", with: "</p>\r\n")
for (shortcode, url) in emojiDict {
let emojiNode = "<span class=\"emoji\" href=\"\(url.absoluteString)\">\(shortcode)</span>"
let pattern = ":\(shortcode):"