summaryrefslogtreecommitdiff
path: root/ext/bg/js/handlebars.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-10 19:24:24 -0400
committerGitHub <noreply@github.com>2020-03-10 19:24:24 -0400
commitf7bbcb6df403ca565b6dcf3ab468967f830b527d (patch)
treea466132d1e0d69a8e91a0cd52414402778d3eaa6 /ext/bg/js/handlebars.js
parent36c55f0b17e7c2697543edc38e444d01da4f4a5c (diff)
parent72219ba3530f9da02d3ec1d704baac6f88863682 (diff)
Merge pull request #408 from toasted-nutbread/use-code-point
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;