Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 5cc3a428f3 1.29.4 2024-06-09 18:26:20 +02:00
ThePendulum bbe573d8f3 Fixed missing word definition breaking Clive. Using em space in wordle letterboard for SChat. 2024-06-09 18:26:17 +02:00
4 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ async function init() {
const sortedWords = validWords.reduce((acc, [rawWord, fullDefinition]) => {
const word = rawWord.toLowerCase();
const anagram = word.split('').sort().join('');
const definitions = fullDefinition?.split(/\d+\.\s+/).filter(Boolean).map((definition) => definition.split('.')[0].toLowerCase());
const definitions = fullDefinition?.split(/\d+\.\s+/).filter(Boolean).map((definition) => definition.split('.')[0].toLowerCase()) || [];
if (!acc[anagram.length]) {
acc[anagram.length] = {};

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "schat2-clive",
"version": "1.29.3",
"version": "1.29.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "schat2-clive",
"version": "1.29.3",
"version": "1.29.4",
"license": "ISC",
"dependencies": {
"better-sqlite3": "^8.3.0",

View File

@ -1,6 +1,6 @@
{
"name": "schat2-clive",
"version": "1.29.3",
"version": "1.29.4",
"description": "Game host for SChat 2-powered chat sites",
"main": "src/app.js",
"scripts": {

View File

@ -58,7 +58,7 @@ function getBoard(letters, showLetters, context) {
return config.platform === 'irc'
? letter
: style.grey(letter);
}).join(' ');
}).join(config.platform === 'irc' ? ' ' : ''); // regular space vs em space
return `${prefix}${middle}${suffix}Letters: ${letterBoard}`; // eslint-disable-line no-irregular-whitespace
}