mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +00:00
Merge branch 'main' of https://github.com/Dimillian/IceCubesApp
This commit is contained in:
commit
bb005386df
1 changed files with 4 additions and 2 deletions
|
@ -61,7 +61,7 @@ public struct HTMLString: Codable, Equatable, Hashable, @unchecked Sendable {
|
||||||
_ = text.removeLast()
|
_ = text.removeLast()
|
||||||
_ = text.removeLast()
|
_ = text.removeLast()
|
||||||
}
|
}
|
||||||
asRawText = text
|
asRawText = (try? Entities.unescape(text)) ?? text
|
||||||
|
|
||||||
if asMarkdown.hasPrefix("\n") {
|
if asMarkdown.hasPrefix("\n") {
|
||||||
_ = asMarkdown.removeFirst()
|
_ = asMarkdown.removeFirst()
|
||||||
|
@ -175,7 +175,9 @@ public struct HTMLString: Codable, Equatable, Hashable, @unchecked Sendable {
|
||||||
return
|
return
|
||||||
} else if node.nodeName() == "#text" {
|
} else if node.nodeName() == "#text" {
|
||||||
var txt = node.description
|
var txt = node.description
|
||||||
|
|
||||||
|
txt = (try? Entities.unescape(txt)) ?? txt
|
||||||
|
|
||||||
if let underscore_regex, let main_regex {
|
if let underscore_regex, let main_regex {
|
||||||
// This is the markdown escaper
|
// This is the markdown escaper
|
||||||
txt = main_regex.stringByReplacingMatches(in: txt, options: [], range: NSRange(location: 0, length: txt.count), withTemplate: "\\\\$1")
|
txt = main_regex.stringByReplacingMatches(in: txt, options: [], range: NSRange(location: 0, length: txt.count), withTemplate: "\\\\$1")
|
||||||
|
|
Loading…
Reference in a new issue