[Userscript] Forum: IME2Furigana

Sorry for the late response -- I did not visit the WaniKani forum for the last two months.

I just spent the last hour catching up on all the missed notifications.

I’m not sure about the zero width space approach… it feels like a hack that can lead to confusing behavior. And it only fixes part of the problem (editing posts that already contain HTML tags followed by brackets). If the user types this combination by themselves, the problem still persists. Although admittedly, they will hopefully proofread the rendered result of what they typed, so this is more unlikely to go unnoticed.

Maybe it would be better to change the furigana markup so that it cannot accidentally affect HTML tags? For example, the furigana markup could be changed to <!kanji>[furigana]. The added exclamation mark differentiates it from valid HTML tags. The downside is, that users of this userscript would have to relearn how to manually type furigana markup. But I assume most people never manually input furigana markup and only rely on the auto-generation of the markup? What is your opinion on this approach?

Also, I was wondering if anyone is even using this script anymore after the Discourse changes, but I have seen some people still recommending it, so I want to address this issue next weekend.

2 Likes

Changing the markup is probably a better approach, however that one specifically may clash with comments followed by a square bracket. <!! perhaps better, dunno

Version 1.13:

Changed the furigana markup to include a dot

IME2Furigana sometimes affected HTML tags followed by BBCode tags that were not intended as furigana markup. To avoid this in the future, I have changed the furigana markup from <kanji>[furigana] to <.kanji>[furigana].


I hope this change will prevent any further issues this script has caused in the book club threads.

3 Likes