diff --git a/src/EditorView.swift b/src/EditorView.swift index c8817cc..f090450 100644 --- a/src/EditorView.swift +++ b/src/EditorView.swift @@ -1496,27 +1496,8 @@ private func highlightFootnoteDefinition(textStorage: NSTextStorage, lineRange: // MARK: - Tables private func highlightTableLine(_ trimmed: String, lineRange: NSRange, textStorage: NSTextStorage, palette: CatppuccinPalette, baseFont: NSFont, isHeader: Bool, isSeparator: Bool) { - let monoFont = NSFont.monospacedSystemFont(ofSize: baseFont.pointSize, weight: .regular) - let boldMono = NSFontManager.shared.convert(monoFont, toHaveTrait: .boldFontMask) - - textStorage.addAttribute(.font, value: monoFont, range: lineRange) - textStorage.addAttribute(.foregroundColor, value: palette.text, range: lineRange) - - if isSeparator { - textStorage.addAttribute(.foregroundColor, value: palette.overlay0, range: lineRange) - return - } - - if isHeader { - textStorage.addAttribute(.font, value: boldMono, range: lineRange) - } - - // Mute pipe delimiters - guard let pipeRegex = try? NSRegularExpression(pattern: "\\|") else { return } - let matches = pipeRegex.matches(in: textStorage.string, range: lineRange) - for match in matches { - textStorage.addAttribute(.foregroundColor, value: palette.overlay0, range: match.range) - } + textStorage.addAttribute(.foregroundColor, value: palette.base, range: lineRange) + textStorage.addAttribute(.font, value: NSFont.systemFont(ofSize: 0.01), range: lineRange) } // MARK: - Lists and Horizontal Rules