summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index f9932a61..504deeda 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -21,7 +21,7 @@ function kanjiLinks(options) {
let result = '';
for (const c of options.fn(this)) {
if (isKanji(c)) {
- result += Handlebars.templates['kanji-link.html']({kanji: c}).trim();
+ result += `<a href="#" class="kanji-link">${c}</a>`;
} else {
result += c;
}
@@ -30,6 +30,10 @@ function kanjiLinks(options) {
return result;
}
+function multiLine(options) {
+ return options.fn(this).split('\n').join('<br>');
+}
+
function isKanji(c) {
const code = c.charCodeAt(0);
return code >= 0x4e00 && code < 0x9fb0 || code >= 0x3400 && code < 0x4dc0;