Skip to content

Instantly share code, notes, and snippets.

@aheze
Last active June 9, 2021 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheze/e24813df2d5d46762809cfc05d070998 to your computer and use it in GitHub Desktop.
Save aheze/e24813df2d5d46762809cfc05d070998 to your computer and use it in GitHub Desktop.
func getAttributedString(_ markdown: String) -> AttributedString {
do {
let attributedString = try AttributedString(markdown: markdown)
return attributedString
} catch {
print("Couldn't parse: \(error)")
}
return AttributedString("Error parsing markdown")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment