fix an issue where the html tag is at the beginning of the localised string

pull/1023/head
Ryan ZHAO 1 year ago
parent f33a153c7f
commit a306f4aa8d

@ -84,7 +84,7 @@ public extension NSAttributedString {
let currentMatchEnd: Int = currentMatch.range.upperBound
/// Ignore invalid ranges
guard currentMatchStart > lastMatchEnd else { return }
guard (currentMatchStart > lastMatchEnd) || (currentMatchStart == lastMatchEnd && currentMatchStart == 0) else { return }
/// Retrieve the tag and content values, store the content and any tags which are currently applied so we can construct the
/// formatted string at the end

Loading…
Cancel
Save