0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-12 04:32:41 +00:00

Normalize brew text before hashing

This commit is contained in:
G.Ambatte
2026-01-11 21:02:12 +13:00
parent 0495513059
commit 4370597587

View File

@@ -216,7 +216,7 @@ const EditPage = (props)=>{
text : brew.text.normalize('NFC'),
pageCount : ((brew.renderer === 'legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1,
patches : stringifyPatches(makePatches(encodeURI(lastSavedBrew.current.text.normalize('NFC')), encodeURI(brew.text.normalize('NFC')))),
hash : await md5(lastSavedBrew.current.text),
hash : await md5(lastSavedBrew.current.text.normalize('NFC')),
textBin : undefined,
version : lastSavedBrew.current.version
};