import SwiftUI /// Third-party attribution is reachable from Account on both platforms. /// The copyright and licence text is the dependency's verbatim notice. struct MarkdownNotices: View { private var licence: String { guard let url = Bundle.module.url(forResource: "SwiftCMark-LICENSE", withExtension: "txt"), let text = try? String(contentsOf: url, encoding: .utf8) else { return "" } return text } var body: some View { Section { DisclosureGroup { Text(verbatim: licence).font(.caption).textSelection(.enabled) Link(destination: URL(string: "https://github.com/swiftlang/swift-cmark/tree/08ddb528923cc1a6527e02b7a1aee9e516ca749a")!) { Text(verbatim: "swiftlang/swift-cmark") } } label: { Text(verbatim: "swift-cmark") } } } }