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 }