mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Changed asterisk rule to bold instead of italics. Fixed extraneous container in settings.
This commit is contained in:
parent
aa5d0f660c
commit
a5f9e77a6b
|
@ -187,7 +187,7 @@ QString ChatMessage::detectMarkdown(const QString &str)
|
|||
|
||||
// Create regex for certain markdown syntax
|
||||
QRegExp exp("(\\*\\*)([^\\*\\*]{2,})(\\*\\*)" // Bold **text**
|
||||
"|(\\*)([^\\*]{2,})(\\*)" // Italics *text*
|
||||
"|(\\*)([^\\*]{2,})(\\*)" // Bold *text*
|
||||
"|(\\_)([^\\_]{2,})(\\_)" // Italics _text_
|
||||
"|(\\_\\_)([^\\_\\_]{2,})(\\_\\_)" // Italics __text__
|
||||
"|(\\-)([^\\-]{2,})(\\-)" // Underline -text-
|
||||
|
@ -230,8 +230,8 @@ QString ChatMessage::detectMarkdown(const QString &str)
|
|||
// Match captured string to corresponding md format
|
||||
if (exp.cap(1) == "**") // Bold **text**
|
||||
htmledSnippet = QString(" <b>%1</b> ").arg(snippet.mid(mul,snippet.length()-2*mul));
|
||||
else if (exp.cap(4) == "*" && snippet.length() > 2) // Italics *text*
|
||||
htmledSnippet = QString(" <i>%1</i> ").arg(snippet.mid(mul/2,snippet.length()-mul));
|
||||
else if (exp.cap(4) == "*" && snippet.length() > 2) // Bold *text*
|
||||
htmledSnippet = QString(" <b>%1</b> ").arg(snippet.mid(mul/2,snippet.length()-mul));
|
||||
else if (exp.cap(7) == "_" && snippet.length() > 2) // Italics _text_
|
||||
htmledSnippet = QString(" <i>%1</i> ").arg(snippet.mid(mul/2,snippet.length()-mul));
|
||||
else if (exp.cap(10) == "__"&& snippet.length() > 4) // Italics __text__
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>2394</height>
|
||||
<width>1277</width>
|
||||
<height>1272</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
|
||||
|
@ -481,13 +481,6 @@ will be sent to them when they appear online to you.</string>
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue
Block a user