mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Fix
This commit is contained in:
@@ -42,7 +42,8 @@ module.exports = class TypingTestCommand extends Command {
|
|||||||
if (msgs.first().content.toLowerCase() !== sentence) {
|
if (msgs.first().content.toLowerCase() !== sentence) {
|
||||||
const diff = new Diff();
|
const diff = new Diff();
|
||||||
const textDiff = diff.main(msgs.first().content.toLowerCase(), sentence);
|
const textDiff = diff.main(msgs.first().content.toLowerCase(), sentence);
|
||||||
const formatted = diff.cleanupSemantic(textDiff).map(change => {
|
diff.cleanupSemantic(textDiff);
|
||||||
|
const formatted = textDiff.map(change => {
|
||||||
if (change[0] === 1) return `**${change[1]}**`;
|
if (change[0] === 1) return `**${change[1]}**`;
|
||||||
if (change[0] === 0) return change[1];
|
if (change[0] === 0) return change[1];
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
Reference in New Issue
Block a user