Skip to content

Commit a2cd2e6

Browse files
committed
Fix tests related to images in attributed strings.
1 parent c6c0093 commit a2cd2e6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.1.5 (2022-02-27)
4+
- Bug fixes to make `AttributedStringGenerator` work with images.
5+
6+
## 1.1.4 (2022-02-27)
7+
- Allow customization of image sizes in the `AttributedStringGenerator`
8+
- Support relative image links in the `AttributedStringGenerator`
9+
310
## 1.1.3 (2022-02-07)
411
- Fix build breakage for Linux
512
- Encode predefined XML entities also for code blocks

Tests/MarkdownKitTests/MarkdownASTests.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@ class MarkdownASTests: XCTestCase {
2525
"<p><img src=\"imagefile.png\" alt=\"Test image\"/></p>")
2626
XCTAssertEqual(generateHtml(imageBaseUrl: URL(fileURLWithPath: "/global/root/path/"),
2727
"![Test image](imagefile.png)"),
28-
"<p><img src=\"/global/root/path/imagefile.png\" alt=\"Test image\"/></p>")
28+
"<p><img src=\"file:///global/root/path/imagefile.png\" alt=\"Test image\"/></p>")
2929
XCTAssertEqual(generateHtml(imageBaseUrl: URL(fileURLWithPath: "/global/root/path/"),
3030
"![Test image](/imagefile.png)"),
31-
"<p><img src=\"/imagefile.png\" alt=\"Test image\"/></p>")
31+
"<p><img src=\"file:///imagefile.png\" alt=\"Test image\"/></p>")
3232
XCTAssertEqual(generateHtml("![Test image](one/imagefile.png)"),
3333
"<p><img src=\"one/imagefile.png\" alt=\"Test image\"/></p>")
3434
XCTAssertEqual(generateHtml(imageBaseUrl: URL(fileURLWithPath: "/global/root/path/"),
3535
"![Test image](one/imagefile.png)"),
36-
"<p><img src=\"/global/root/path/one/imagefile.png\" alt=\"Test image\"/></p>")
36+
"<p><img src=\"file:///global/root/path/one/imagefile.png\" alt=\"Test image\"/></p>")
3737
XCTAssertEqual(generateHtml(imageBaseUrl: URL(fileURLWithPath: "/global/root/path/"),
3838
"![Test image](/one/imagefile.png)"),
39-
"<p><img src=\"/one/imagefile.png\" alt=\"Test image\"/></p>")
40-
39+
"<p><img src=\"file:///one/imagefile.png\" alt=\"Test image\"/></p>")
4140
}
4241
}
4342

0 commit comments

Comments
 (0)