The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
MarkdownUI 2.3.0
15 weeks ago
## What's Changed
* Added: Mac Catalyst support (#287)
* Added: `FontWidth`, a text style that adjusts the font width (thanks @kirkbig #266)
* Changed: Use `#if canImport(...)` instead of `#if os(...)` (thanks @MojtabaHs #268)
* Fixed: Mac Catalyst build failures (thanks @kirkbig #283)
* Changed: Use `assertSnapshot(of:...)` instead of the deprecated `assertSnapshot(matching:...)` (thanks @kirkbig #284)
**Full Changelog**: https://github.com/gonzalezreal/swift-markdown-ui/compare/2.2.0...2.3.0
MarkdownUI 2.2.0
31 weeks ago
## What's Changed
* Fixed: Apply the current text style foreground color to code blocks (#228)
* Fixed: Unexpected code block truncation (#256)
* Added: Support for visionOS (thanks @Rminsh, #252)
* Infra: Adopt [gonzalezreal/NetworkImage](https://github.com/gonzalezreal/NetworkImage) as the default image provider (#258)
* Added: `MarkdownContent` HTML rendering (thanks @srna, #253)
* Infra: Enable text selection in Demo (#259)
## New Contributors
* @Rminsh made their first contribution in https://github.com/gonzalezreal/swift-markdown-ui/pull/252
* @srna made their first contribution in https://github.com/gonzalezreal/swift-markdown-ui/pull/253
**Full Changelog**: https://github.com/gonzalezreal/swift-markdown-ui/compare/2.1.0...2.2.0
MarkdownUI 2.1.0
1 year ago
## What's Changed
* Infrastructure: Refactor Markdown parsing (#210)
* Infrastructure: Bump CI workflow's Xcode to 14.2 (#212)
* Fixed: Deprecation message (#214)
* Added: Provide access to the language and the content of a code block from the body of the `codeBlock` style (#215)
* Added: Provide access to the block's Markdown content from the body of most of the block styles (#220)
* Added: Render HTML line breaks `<br>` (#221)
* Changed: Move the `fixedSize` modifier from the paragraph view to the block style in all the bundled themes (#222)
**Full Changelog**: https://github.com/gonzalezreal/swift-markdown-ui/compare/2.0.2...2.1.0
MarkdownUI 2.0.2
1 year ago
## What's Changed
* Render first level inline images by @gonzalezreal in https://github.com/gonzalezreal/swift-markdown-ui/pull/193
* Remove `Markdown` view `@State` property by @gonzalezreal in https://github.com/gonzalezreal/swift-markdown-ui/pull/197
* Add `ImageRenderer` demo by @gonzalezreal in https://github.com/gonzalezreal/swift-markdown-ui/pull/198
**Full Changelog**: https://github.com/gonzalezreal/swift-markdown-ui/compare/2.0.1...2.0.2
MarkdownUI 2.0.1
1 year ago
## What's Changed
* Fix the image cache in the default image provider by @gonzalezreal in https://github.com/gonzalezreal/swift-markdown-ui/pull/187
**Full Changelog**: https://github.com/gonzalezreal/swift-markdown-ui/compare/2.0.0...2.0.1
MarkdownUI 2.0.0
1 year ago
## Overview
MarkdownUI 2 has been rewritten from scratch and brings a ton of new features and improvements
like:
- [GitHub Flavored Markdown](https://github.github.com/gfm/) (tables, task lists, strikethrough text, and autolinks)
- Native SwiftUI rendering
- Customization support via themes, text styles, and block styles.
These new features come with the cost of a few **breaking changes** that these notes will help you to
address.
## Minimum requirements
You can use MarkdownUI 2 on the following platforms:
- macOS 12.0+
- iOS 15.0+
- tvOS 15.0+
- watchOS 8.0+
Some features, like displaying tables or multi-image paragraphs, require macOS 13.0+, iOS 16.0+,
tvOS 16.0+, and watchOS 9.0+.
## Updated package name
To reflect the Swift community naming conventions, the package has been renamed from `MarkdownUI` to `swift-markdown-ui`. So, you may eventually need to update any Xcode projects or `Package.swift` files that depend on MarkdownUI.
## Rendering
MarkdownUI 2 uses SwiftUI primitives to render Markdown and no longer depends on [gonzalezreal/AttributedText](https://github.com/gonzalezreal/AttributedText).
## Creating Markdown content
MarkdownUI 2 introduces a new domain-specific language to create Markdown content and no longer
depends on [gonzalezreal/SwiftCommonMark](https://github.com/gonzalezreal/SwiftCommonMark).
One significant difference when using MarkdownUI 2 is that `MarkdownContent` replaces `Document`
by providing similar functionality.
Another thing to be aware of is the different naming of some of the types you use to compose
Markdown content:
- Use `Blockquote` instead of `BlockQuote`.
- Use `NumberedList` instead of `OrderedList`.
- Use `BulletedList` instead of `BulletList`.
- Use `InlineImage` instead of `Image`.
- Use `InlineLink` instead of `Link`.
- Use `Code` instead of `InlineCode`.
## Loading asset images
MarkdownUI 2 introduces the `ImageProvider` protocol and its conforming types
`DefaultImageProvider` and `AssetImageProvider`. These types and the new
`markdownImageProvider(_:)` modifier replace the `MarkdownImageHandler` type and
the `setImageHandler(_:forURLScheme:)` modifier.
The following example shows how to configure the asset image provider to load images from the
main bundle.
```swift
Markdown {
"![A dog](dog)"
"β Photo by AndrΓ© Spieker"
}
.markdownImageProvider(.asset)
```
## Customizing link behavior
The `onOpenMarkdownLink(perform:)` modifier in MarkdownUI 1.x was provided to enable link behavior
customization in macOS 11.0, iOS 14.0, and tvOS 14.0. This modifier is no longer available in
MarkdownUI 2 since it does not support those platforms. However, you can customize the link
behavior by setting the `openURL` environment value with a custom `OpenURLAction`.
## Styling Markdown
MarkdownUI 1.x offered a few options to customize the content appearance. In contrast, MarkdownUI 2
brings the new `Theme`, `TextStyle`, and `BlockStyle` types that let you apply a custom
appearance to blocks and text inlines in a Markdown view.
Consequently, the `MarkdownStyle` type, all of its subtypes, and the `markdownStyle(_:)` modifier
are no longer available in MarkdownUI 2.
MarkdownUI 1.1.1
1 year ago
## What's Changed
* Update GitHub actions by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/110
* Fix custom font resolution by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/111
* Fix crash when rendering a code block without a closing fence by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/112
* Fix hang when trying to load invalid image by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/113
* Fix rendering thematic break with centered or right aligned text by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/114
**Full Changelog**: https://github.com/gonzalezreal/MarkdownUI/compare/1.1.0...1.1.1
MarkdownUI 1.1.0
2 years ago
## What's Changed
* Remove MarkdownStyle.Color by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/93
* Resolve fonts considering the environment's size category by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/94
* Use the environment's line spacing by @gonzalezreal in https://github.com/gonzalezreal/MarkdownUI/pull/95
**Full Changelog**: https://github.com/gonzalezreal/MarkdownUI/compare/1.0.0...1.1.0
## What's Changed
* Breaking change: New stable API and simplified customization appearance
* Changed: New rendering implementation.
* Added: Enable loading images from bundles
* Added: Render thematic breaks
* Added: Enable custom markdown link handling
* Added: Make text not selectable on iOS
* Changed: Improved list rendering.
* Removed: `NSAttributedString` based HTML block rendering
* Infrastructure: Remove watchOS scheme, remove unnecessary availability attributes and replace SwiftFormat with swift-format.
* Infrastructure: Use Xcode 13.2 for CI
* Infrastructure: New demo app with tvOS and Catalyst targets
* Infrastructure: Improved README and documentation
* Bug fixed: View update issues on iOS 15
MarkdownUI 0.5.2
2 years ago
- Set platform requirements
- Add snapshot test for markdown images
- Fix an issue with image loading