This commit is contained in:
Malte Jürgens 2023-02-15 15:49:04 +01:00
parent 74fdef683f
commit 485ff9634b
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -249,6 +249,10 @@ void DiscordPage::javaScriptConsoleMessage(
QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message,
int lineNumber, const QString &sourceID) {
auto colorSegments = message.split("%c");
if (colorSegments[0] != "") {
for (auto line : colorSegments[0].split("\n"))
qDebug(discordLog) << line.toUtf8().constData();
}
for (auto segment : colorSegments.mid(1)) {
auto lines = segment.split("\n");
QString ansi;