/******** Determine format types from a block declaration ********/
quint64 QssParser::parseFormatType(const QString &decl) {
- QRegExp rx("ChatLine(?:::(\\w+))?(?:#(\\w+))?(?:\\[([=-,\\\"\\w\\s]+)\\])?");
+ QRegExp rx("ChatLine(?:::(\\w+))?(?:#([\\w\\-]+))?(?:\\[([=-,\\\"\\w\\s]+)\\])?");
// $1: subelement; $2: msgtype; $3: conditionals
if(!rx.exactMatch(decl)) {
qWarning() << Q_FUNC_INFO << tr("Invalid block declaration: %1").arg(decl);
fmtType |= UiStyle::DayChangeMsg;
else if(msgType == "topic")
fmtType |= UiStyle::TopicMsg;
- else if(msgType == "netsplitJoin")
+ else if(msgType == "netsplit-join")
fmtType |= UiStyle::NetsplitJoinMsg;
- else if(msgType == "netsplitQuit")
+ else if(msgType == "netsplit-quit")
fmtType |= UiStyle::NetsplitQuitMsg;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
void QssParser::parseFontSize(const QString& value, QTextCharFormat* format) {
- QRegExp rx("\\(d+)(pt|px)");
+ QRegExp rx("(\\d+)(pt|px)");
if(!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font size specification: %1").arg(value);
return;