From 09c0832a1b2af5a82abcceef1de9e6e124ceff0f Mon Sep 17 00:00:00 2001 From: Andrew Farquharson Date: Sat, 12 Oct 2024 11:43:10 +1300 Subject: [PATCH] fix xcode 16 build failure --- Package.swift | 4 ++-- Sources/SwiftMarkdown/SwiftMarkdown.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index 0c930e8..462ec05 100644 --- a/Package.swift +++ b/Package.swift @@ -8,10 +8,10 @@ let package = Package( .library(name: "SwiftMarkdown", targets: ["SwiftMarkdown"]), ], dependencies: [ - .package(url: "https://github.com/brokenhandsio/cmark-gfm.git", from: "2.1.0"), + .package(url: "https://github.com/apple/swift-cmark.git", from: "0.5.0"), ], targets: [ - .target(name: "SwiftMarkdown", dependencies: ["cmark"]), + .target(name: "SwiftMarkdown", dependencies: ["cmark-gfm"]), .testTarget(name: "SwiftMarkdownTests", dependencies: ["SwiftMarkdown"]), ] ) diff --git a/Sources/SwiftMarkdown/SwiftMarkdown.swift b/Sources/SwiftMarkdown/SwiftMarkdown.swift index 5a76248..cee7439 100644 --- a/Sources/SwiftMarkdown/SwiftMarkdown.swift +++ b/Sources/SwiftMarkdown/SwiftMarkdown.swift @@ -1,4 +1,4 @@ -import cmark +import cmark_gfm #if os(Android) || os(Linux) import Glibc #endif @@ -28,7 +28,7 @@ public func markdownToHTML(_ str: String, options: MarkdownOptions = [.safe]) th var buffer: String? try str.withCString { - guard let buf = cmark_gfm_markdown_to_html($0, Int(strlen($0)), options.rawValue) else { + guard let buf = cmark_markdown_to_html($0, Int(strlen($0)), options.rawValue) else { throw MarkdownError.conversionFailed }