Revert "Fix: flip direction of diff to show wrong as red and correct as green"

This reverts commit 5273160a0f.
This commit is contained in:
Richard Wong 2024-03-16 23:41:14 +09:00
parent 5273160a0f
commit 55078b5e18
Signed by: richard
GPG Key ID: 5BD36BA2E9EE33D0
1 changed files with 8 additions and 8 deletions

View File

@ -100,12 +100,12 @@ const VerseValidator = ({ element: { pack, title, chapterTitle, reference, verse
const DiffViewer = ({oldValue, newValue}) => { const DiffViewer = ({oldValue, newValue}) => {
const string1 = String(oldValue) const string1 = String(oldValue)
.replace(/[^\w\s]/g, "") .replace(/[^\w\s]/g, "")
.toLowerCase(); .toLowerCase();
const string2 = String(newValue) const string2 = String(newValue)
.replace(/[^\w\s]/g, "") .replace(/[^\w\s]/g, "")
.toLowerCase(); .toLowerCase();
return (<StringDiff oldValue={string1} newValue={string2} diffMethod="diffWords" />) return (<StringDiff oldValue={string1} newValue={string2} diffMethod="diffWords" />)
} }
@ -202,18 +202,18 @@ const VerseValidator = ({ element: { pack, title, chapterTitle, reference, verse
<div> <div>
ChapterTitle: ChapterTitle:
<DiffViewer <DiffViewer
oldValue={inputChapterTitle} oldValue={chapterTitle}
newValue={chapterTitle} newValue={inputChapterTitle}
/> />
</div> </div>
)} )}
<p></p> <p></p>
<div> <div>
Title: <DiffViewer oldValue={inputTitle} newValue={title} /> Title: <DiffViewer oldValue={title} newValue={inputTitle} />
</div> </div>
<p></p> <p></p>
<div> <div>
Verse: <DiffViewer oldValue={inputVerse} newValue={verse} /> Verse: <DiffViewer oldValue={verse} newValue={inputVerse} />
</div> </div>
</div> </div>
)} )}