From ac65089e86d9ed7f1eff5f51fe041151adaffe2a Mon Sep 17 00:00:00 2001 From: Dan Fabulich Date: Sun, 17 May 2026 20:36:18 -0700 Subject: [PATCH] Example of intercepted Markdown link text --- Sources/Showcase/TextPlayground.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/Showcase/TextPlayground.swift b/Sources/Showcase/TextPlayground.swift index d16fc86..3effa72 100644 --- a/Sources/Showcase/TextPlayground.swift +++ b/Sources/Showcase/TextPlayground.swift @@ -48,6 +48,12 @@ struct TextPlayground: View { Text("Markdown ~~Strikethrough text~~") Text("Markdown `Code text`") Text("Markdown [Link text](https://skip.dev) and [\("Another link")](\("https://swift.org"))") + Text("Markdown [Link text](example://intercept) to intercept") + .environment(\.openURL, OpenURLAction { url in + logger.info("Intercepted link: \(url)") + return OpenURLAction.Result.handled + }) + .tint(.red) Text("Markdown **Bold text** with .italic()") .italic() Text("Markdown **bold** \("**String interpolation**") is not formatted")