Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -15,6 +15,10 @@ let package = Package(
products: [
.library(name: "MarkdownView", targets: ["MarkdownView"]),
],
traits: [
"LaTeX",
.default(enabledTraits: ["LaTeX"])
Comment on lines +19 to +20
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first line declares a package trait, the second makes sure that the trait is enabled by default to keep compatibility with the current behavior.

],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-markdown.git", from: "0.5.0"),
.package(url: "https://github.com/raspu/Highlightr.git", from: "2.2.1"),
Expand All @@ -36,7 +40,7 @@ let package = Package(
.product(
name: "LaTeXSwiftUI",
package: "LaTeXSwiftUI",
condition: .when(platforms: [.iOS, .macOS])
condition: .when(platforms: [.iOS, .macOS], traits: ["LaTeX"])
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one makes sure that this package is only included if the trait is enabled.

),
],
swiftSettings: [.swiftLanguageMode(.v6)]
Expand Down
2 changes: 1 addition & 1 deletion Sources/MarkdownView/WIP/MarkdownTextNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ extension MarkdownTextNode {
)
)
default:
return Text("Unimplemented: \(kind)")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line just fixes a warning.

return Text("Unimplemented: \(String(describing: kind))")
}
}
}
Loading