mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
Fix spacing on messages with links.
This commit is contained in:
parent
5586df1a93
commit
d518c12cf9
2 changed files with 2 additions and 3 deletions
|
@ -189,7 +189,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
ListModel {
|
||||
id: local
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ const formatting = {
|
|||
if (firstMatch == null) {
|
||||
// If there is no more text to parse, break out of the loop and return the message array.
|
||||
// Format any remaining text as a basic 'text' type.
|
||||
messageArray.push({type: 'text', value: runningMessage});
|
||||
if (runningMessage.trim() != "") messageArray.push({type: 'text', value: runningMessage});
|
||||
|
||||
// Append a final 'fill width' to the message text.
|
||||
messageArray.push({type: 'messageEnd'});
|
||||
|
@ -95,7 +95,7 @@ const formatting = {
|
|||
|
||||
let foundMatch = runningMessage.match(regex)[0];
|
||||
|
||||
messageArray.push({type: 'text', value: runningMessage.substring(0, indexOfFirstMatch)});
|
||||
if (runningMessage.substring(0, indexOfFirstMatch) != "") messageArray.push({type: 'text', value: runningMessage.substring(0, indexOfFirstMatch)});
|
||||
messageArray.push({type: regexPatterns[firstMatch[1]].type, value: runningMessage.substring(indexOfFirstMatch, indexOfFirstMatch + foundMatch.length)});
|
||||
|
||||
runningMessage = runningMessage.substring(indexOfFirstMatch + foundMatch.length); // Remove the part of the message we have worked with
|
||||
|
|
Loading…
Reference in a new issue