Skip to content

Commit

Permalink
Add newline after each fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtom committed Mar 10, 2021
1 parent 233fa91 commit fcbabb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Ink/API/MarkdownParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion Tests/InkTests/CodeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class CodeTests: XCTestCase {
let plainText = MarkdownParser().plainText(from: markdown)

XCTAssertEqual(html, "<p>Hello <code>inline.code()</code></p>")
XCTAssertEqual(plainText, "Hello inline.code()")
XCTAssertEqual(plainText, "Hello inline.code()\n")
}

func testCodeBlockWithJustBackticks() {
Expand Down

0 comments on commit fcbabb8

Please sign in to comment.