aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/handlebars.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-09 21:34:31 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-09 21:58:06 -0400
commit72219ba3530f9da02d3ec1d704baac6f88863682 (patch)
tree08d93d4251ca19e3ef816d7d7310c41b5ae7ae0c /ext/bg/js/handlebars.js
parent0cd1f8f20a1b632847e14b280849e4af1b6dd9ad (diff)
Replace charCodeAt and fromCharCode with codePointAt and fromCodePoint
Diffstat (limited to 'ext/bg/js/handlebars.js')
-rw-r--r--ext/bg/js/handlebars.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/handlebars.js b/ext/bg/js/handlebars.js
index b1443447..3ee4e7fa 100644
--- a/ext/bg/js/handlebars.js
+++ b/ext/bg/js/handlebars.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-/*global jpIsCharCodeKanji, jpDistributeFurigana, Handlebars*/
+/*global jpIsCodePointKanji, jpDistributeFurigana, Handlebars*/
function handlebarsEscape(text) {
return Handlebars.Utils.escapeExpression(text);
@@ -62,7 +62,7 @@ function handlebarsFuriganaPlain(options) {
function handlebarsKanjiLinks(options) {
let result = '';
for (const c of options.fn(this)) {
- if (jpIsCharCodeKanji(c.charCodeAt(0))) {
+ if (jpIsCodePointKanji(c.codePointAt(0))) {
result += `<a href="#" class="kanji-link">${c}</a>`;
} else {
result += c;