diff --git a/Sources/Ink/API/MarkdownParser.swift b/Sources/Ink/API/MarkdownParser.swift index 78c5eed..d183e1f 100644 --- a/Sources/Ink/API/MarkdownParser.swift +++ b/Sources/Ink/API/MarkdownParser.swift @@ -111,7 +111,7 @@ public struct MarkdownParser { let plainText = fragments.reduce(into: "", { result, wrapper in let plainText = wrapper.fragment.plainText() - result.append(plainText) + result.append("\(plainText)\n") }) return Markdown( diff --git a/Tests/InkTests/CodeTests.swift b/Tests/InkTests/CodeTests.swift index a7928a5..661bfff 100644 --- a/Tests/InkTests/CodeTests.swift +++ b/Tests/InkTests/CodeTests.swift @@ -14,7 +14,7 @@ final class CodeTests: XCTestCase { let plainText = MarkdownParser().plainText(from: markdown) XCTAssertEqual(html, "

Hello inline.code()

") - XCTAssertEqual(plainText, "Hello inline.code()") + XCTAssertEqual(plainText, "Hello inline.code()\n") } func testCodeBlockWithJustBackticks() {