mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-23 12:59:44 +00:00
fix(@desktop/chat): proper font style for code blocks
This commit is contained in:
parent
80e2534df4
commit
31eb8d939d
@ -21,8 +21,7 @@ StatusSyntaxHighlighter::StatusSyntaxHighlighter(QTextDocument *parent)
|
|||||||
//ITALIC
|
//ITALIC
|
||||||
|
|
||||||
//CODE
|
//CODE
|
||||||
singlelineCodeBlockFormat.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
singlelineCodeBlockFormat.setFontFamily("Roboto Mono");
|
||||||
singlelineCodeBlockFormat.setFontPointSize(15);
|
|
||||||
rule.pattern = QRegularExpression(QStringLiteral("\\`(.*?)\\`"));
|
rule.pattern = QRegularExpression(QStringLiteral("\\`(.*?)\\`"));
|
||||||
rule.format = singlelineCodeBlockFormat;
|
rule.format = singlelineCodeBlockFormat;
|
||||||
highlightingRules.append(rule);
|
highlightingRules.append(rule);
|
||||||
@ -36,8 +35,7 @@ StatusSyntaxHighlighter::StatusSyntaxHighlighter(QTextDocument *parent)
|
|||||||
//STRIKETHROUGH
|
//STRIKETHROUGH
|
||||||
|
|
||||||
//CODE BLOCK
|
//CODE BLOCK
|
||||||
multiLineCodeBlockFormat.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
multiLineCodeBlockFormat.setFontFamily("Roboto Mono");
|
||||||
multiLineCodeBlockFormat.setFontPointSize(15);
|
|
||||||
rule.pattern = QRegularExpression(QStringLiteral("\\`\\`\\`(.*?)\\`\\`\\`"));
|
rule.pattern = QRegularExpression(QStringLiteral("\\`\\`\\`(.*?)\\`\\`\\`"));
|
||||||
rule.format = multiLineCodeBlockFormat;
|
rule.format = multiLineCodeBlockFormat;
|
||||||
highlightingRules.append(rule);
|
highlightingRules.append(rule);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user