mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 11:41:01 +00:00
Fix space between mentions in status
This commit is contained in:
parent
05b5951ee1
commit
cff6f3a843
1 changed files with 4 additions and 2 deletions
|
@ -16,8 +16,10 @@ extension HTMLString {
|
|||
|
||||
public var asSafeAttributedString: AttributedString {
|
||||
do {
|
||||
// Add space between hashtags that follow each other
|
||||
let markdown = asMarkdown.replacingOccurrences(of: ")[#", with: ") [#")
|
||||
// Add space between hashtags and mentions that follow each other
|
||||
let markdown = asMarkdown
|
||||
.replacingOccurrences(of: ")[#", with: ") [#")
|
||||
.replacingOccurrences(of: ")[@", with: ") [@")
|
||||
let options = AttributedString.MarkdownParsingOptions(allowsExtendedAttributes: true,
|
||||
interpretedSyntax: .inlineOnlyPreservingWhitespace)
|
||||
return try AttributedString(markdown: markdown, options: options)
|
||||
|
|
Loading…
Reference in a new issue