Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created June 15, 2021 11:51
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 laevandus/0bce4eec71882f10a69890c85c869b87 to your computer and use it in GitHub Desktop.
Save laevandus/0bce4eec71882f10a69890c85c869b87 to your computer and use it in GitHub Desktop.
let string = AttributedString(localized: "This contains my ^[message](secretMessage: {id: 'message_id', value: 'Hello!'}) attribute in markdown", including: \.myApp)
// print(string.runs)
// This contains my {
// NSPresentationIntent = [paragraph (id 1)]
// NSLanguage = en
// }
// message {
// NSLanguage = en
// NSPresentationIntent = [paragraph (id 1)]
// secretMessage = Message(id: "message_id", value: "Hello!")
// }
// attribute in markdown {
// NSLanguage = en
// NSPresentationIntent = [paragraph (id 1)]
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment