diff options
Diffstat (limited to 'modules/unicode/unicode.js')
-rw-r--r-- | modules/unicode/unicode.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/unicode/unicode.js b/modules/unicode/unicode.js index 113ea83..ee83179 100644 --- a/modules/unicode/unicode.js +++ b/modules/unicode/unicode.js @@ -114,14 +114,18 @@ module.exports = function (app, io, moddir) { app.get("/unicode/lookup/:query", (req, res) => { const codepoints = []; + let notfound = ""; for (let codepoint of req.params.query) { codepoint = codepoint.codePointAt(0); - codepoints.push(lookupCode(codepoint)); + const result = lookupCode(codepoint); + if (result != null) codepoints.push(result); + else notfound += String.fromCodePoint(codepoint); } res.json({ index: recogniseIndex(req.params.query) || undefined, codepoints: codepoints, + notfound: notfound, search: searchDescription(req.params.query), }); }); |