diff --git a/src/EditorView.swift b/src/EditorView.swift index 07cdec2..85cb3b9 100644 --- a/src/EditorView.swift +++ b/src/EditorView.swift @@ -225,8 +225,8 @@ private func highlightMarkdownLine(_ trimmed: String, lineRange: NSRange, textSt private func highlightCodeLine(_ line: String, lineRange: NSRange, textStorage: NSTextStorage, syn: Theme.SyntaxColors) { let nsLine = line as NSString let baseFont = Theme.editorFont - let italicFont = NSFontManager.shared.convert(baseFont, toHaveTrait: .italicTrait) - let boldFont = NSFontManager.shared.convert(baseFont, toHaveTrait: .boldTrait) + let italicFont = NSFontManager.shared.convert(baseFont, toHaveTrait: .italicFontMask) + let boldFont = NSFontManager.shared.convert(baseFont, toHaveTrait: .boldFontMask) let trimmed = line.trimmingCharacters(in: .whitespaces) @@ -252,10 +252,10 @@ private func highlightCodeLine(_ line: String, lineRange: NSRange, textStorage: highlightCodeTokens(nsLine, inRange: NSRange(location: 0, length: nsLine.length), lineOffset: lineRange.location, textStorage: textStorage, syn: syn) // Bold markers **text** - highlightInlineMarkdown(textStorage: textStorage, lineRange: lineRange, pattern: "\\*\\*(.+?)\\*\\*", markerLen: 2, trait: .boldTrait, font: boldFont) + highlightInlineMarkdown(textStorage: textStorage, lineRange: lineRange, pattern: "\\*\\*(.+?)\\*\\*", markerLen: 2, trait: .boldFontMask, font: boldFont) // Italic markers *text* - highlightInlineMarkdown(textStorage: textStorage, lineRange: lineRange, pattern: "(?