Skip to content

Commit

Permalink
Added init() to SwiftUI View.
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroalhonen committed Jul 10, 2021
1 parent 5f25232 commit 7cd587f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Sources/NiftyMarkdownFormatter/NiftyMarkdownFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ private func formattedHeading(_ formattedText: Heading) -> Text {
- Parameter markdown: The text needed to be formatted, as a `String`
*/
public struct FormattedMarkdown: View {

public init(markdown: String) {
self.markdown = markdown
}
let markdown: String

public var body: some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ final class Nifty_Markdown_FormatterTests: XCTestCase {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(Nifty_Markdown_Formatter().text, "Hello, World!")
// XCTAssertEqual(Nifty_Markdown_Formatter.text, "Hello, World!")
}
}

0 comments on commit 7cd587f

Please sign in to comment.