Fix formatting sometimes not formatting the last part of a message.

This commit is contained in:
armored-dragon 2024-12-19 04:48:56 -06:00
parent 7d789acaa6
commit 0c3fbbbeb9
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B

View file

@ -306,10 +306,8 @@
let firstMatch = _findFirstMatch();
if (firstMatch == null) {
// If there was not any matches found in the entire message, format the whole message as a single text entry.
if (messageArray.length == 0) {
messageArray.push({type: 'text', value: runningMessage});
}
// Format any remaining text as a basic 'text' type.
messageArray.push({type: 'text', value: runningMessage});
// Append a final 'fill width' to the message text.
messageArray.push({type: 'messageEnd'});