refactors unicode character conversion

This commit is contained in:
Sam ONeill
2022-02-10 22:16:40 +13:00
parent b1d3484416
commit 29ed931bb0

View File

@@ -953,7 +953,7 @@ define([
*/
const unicodeToString = (text) => {
const result = text.replace(/\\u[\dA-F]{4}/gi, (match) => String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)))
return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result;
return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result
}
/**