gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.45k stars 302 forks source link

Error while compiling after the last merge. #39

Closed lukacs-m closed 3 years ago

lukacs-m commented 3 years ago

Hello, first of all thank you for the work done on this library. It seems that the last merge has brought in an error. When I try to compile my project with MarkdownUI I get and error coming from the lib and more specifically the following function.

` func makeHeadingFont(_ level: Int) -> Font? { let fontSizeMultiple = headingFontSizeMultiples[min(level, headingFontSizeMultiples.count) - 1] let fontSize = round(fontSizeMultiple * font.pointSize) let font = Font(descriptor: font.fontDescriptor, size: fontSize)

if canImport(UIKit)

        return font.bold()
    #elseif os(macOS)
        return font?.bold()
    #endif
}`

To be more precise the line let font = Font(descriptor: font.fontDescriptor, size: fontSize) produces a Variable used within its own initial value error.

Hope it helps.

gonzalezreal commented 3 years ago

Ouch! I screwed it up in the last release. I will release a patch release as soon as I can.