Description
StructuredText(markdown:) does not render Markdown image links where an image is used as the link content:
[](https://example.com/b.png)
This is valid Markdown and same as
<a href="https://example.com/b.png">
<img src="https://example.com/a.png" alt="">
</a>
In this case, Textual currently renders no visible content for the linked image. A plain image renders correctly:

The issue appears to come from the Foundation AttributedString(markdown:) parser path used by Textual. For example:
let markdown = "[](https://example.com/b.png)"
let attributedString = try AttributedString(markdown: markdown)
print(String(attributedString.characters)) // ""
print(attributedString.runs.count) // 0
Since the parsed attributed string contains no runs, Textual's image attachment loader does not get a chance to load or render the image.
Checklist
Expected behavior
StructuredText(markdown:) should render the image from the nested image markdown:

Ideally, the image should also preserve the outer link destination:
https://example.com/b.png
If preserving the clickable image link is not currently possible, rendering the image without dropping the content would still be preferable to rendering nothing.
Actual behavior
The linked image markdown renders as empty content. No image is displayed.
Steps to reproduce
Use Textual with Markdown containing an image wrapped in a link:
import SwiftUI
import Textual
struct ContentView: View {
var body: some View {
StructuredText(
markdown: "[](https://example.com/b.png)"
)
.textual.imageAttachmentLoader(.image())
}
}
Compare it with the plain image version, which renders as expected:
StructuredText(markdown: "")
.textual.imageAttachmentLoader(.image())
Textual version information
0.3.1
Destination operating system
macOS 26.3.1
Xcode version information
Xcode 26.3
Build version 17C529
Swift Compiler version information
swift-driver version: 1.127.15 Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
Target: arm64-apple-macosx26.0
Description
StructuredText(markdown:)does not render Markdown image links where an image is used as the link content:This is valid Markdown and same as
In this case, Textual currently renders no visible content for the linked image. A plain image renders correctly:
The issue appears to come from the Foundation
AttributedString(markdown:)parser path used by Textual. For example:Since the parsed attributed string contains no runs, Textual's image attachment loader does not get a chance to load or render the image.
Checklist
mainbranch of this package.Expected behavior
StructuredText(markdown:)should render the image from the nested image markdown:Ideally, the image should also preserve the outer link destination:
https://example.com/b.pngIf preserving the clickable image link is not currently possible, rendering the image without dropping the content would still be preferable to rendering nothing.
Actual behavior
The linked image markdown renders as empty content. No image is displayed.
Steps to reproduce
Use Textual with Markdown containing an image wrapped in a link:
Compare it with the plain image version, which renders as expected:
Textual version information
0.3.1
Destination operating system
macOS 26.3.1
Xcode version information
Xcode 26.3
Build version 17C529
Swift Compiler version information