Skip to content

Commit

Permalink
Fix toJSONString()
Browse files Browse the repository at this point in the history
  • Loading branch information
ninxsoft committed Sep 28, 2023
1 parent 54386b3 commit fb11116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Low Profile/Extensions/String+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extension String {
string = string.replacingOccurrences(of: line, with: components.joined())
}

string = string.replacingOccurrences(of: identifier, with: ":").replacingOccurrences(of: "\"\"", with: "\"").replacing(/"?(\s""\\n"")+/, with: "\\n\\n").replacingUnicode()
string = string.replacingOccurrences(of: identifier, with: ":").replacing(/\: ""[^,]/, with: ": \"").replacing(/"?(\s""""\\n"""")+/, with: "\\n\\n").replacingUnicode()

guard let data: Data = string.data(using: .utf8) else {
return nil
Expand Down

0 comments on commit fb11116

Please sign in to comment.