diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-01-20 23:02:31 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-01-20 23:02:31 +0100 |
commit | d55da1c130a1bc6087f28644608f5837847b7b75 (patch) | |
tree | e20cfb6662397a89f7afa2e1d26035f5cdb606ec /anki-card-template/card.js | |
parent | f6680b19af0ec0caffc579a003d3d52b1c042a9f (diff) |
fix note1.3.0
Diffstat (limited to 'anki-card-template/card.js')
-rw-r--r-- | anki-card-template/card.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/anki-card-template/card.js b/anki-card-template/card.js index 7e44b2e..18c8cb9 100644 --- a/anki-card-template/card.js +++ b/anki-card-template/card.js @@ -55,6 +55,9 @@ HTMLElement.prototype.parse = function() { if (this.classList.contains("parse-brackets")) { if (i == 0) { + // start kanji reading + out += `<span class="kanji">`; + var match = input.match(/\((.+?)\)/); // display "(note)" before kanji if (match) { @@ -62,9 +65,6 @@ HTMLElement.prototype.parse = function() { note_head = match.index; note_tail = note_head + match[0].length; } - // start kanji reading - out += `<span class="kanji">`; - continue; } // ignore note if parsed if (i == note_head) { i += note_tail - 1; continue; } |