This commit is contained in:
Kovid Goyal 2023-04-27 19:55:49 +05:30
parent fa6fecb54b
commit 400bc9be54
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -99,10 +99,8 @@ class MarkdownHighlighter(QSyntaxHighlighter):
format = QTextCharFormat()
if 'color' in subtheme:
format.setForeground(QBrush(QColor(subtheme['color'])))
if 'font-weight' in subtheme:
format.setFontWeight(QFont.Weight.Bold if subtheme['font-weight']=='bold' else QFont.Weight.Normal)
if 'font-style' in subtheme:
format.setFontItalic(True if subtheme['font-style']=='italic' else False)
format.setFontWeight(QFont.Weight.Bold if subtheme.get('font-weight') == 'bold' else QFont.Weight.Normal)
format.setFontItalic(subtheme.get('font-style') == 'italic')
self.MARKDOWN_KWS_FORMAT[k] = format
self.rehighlight()