Skip to content

Commit

Permalink
Fix #39
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezreal committed Feb 27, 2021
1 parent cae6f69 commit e8931e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/MarkdownUI/Shared/MarkdownStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ public extension MarkdownStyle {
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)
let headingFont = Font(descriptor: font.fontDescriptor, size: fontSize)

#if canImport(UIKit)
return font.bold()
return headingFont.bold()
#elseif os(macOS)
return font?.bold()
return headingFont?.bold()
#endif
}

Expand Down

0 comments on commit e8931e3

Please sign in to comment.