[Userscript] Forum: IME2Furigana

Thanks for the bug report – I have confirmed that version 1.4 doesn’t work in Waterfox. Version 1.5 should fix this. Since you went back to version 1.3, it probably won’t auto-update for you and you have to manually install the current version. And thank you for adding the script to the API list :slight_smile:


When I saw some time ago that you had problems with RegExp lookaheads in Wanikani Heatmap, I was wondering if some users would also have problems with my IME2Furigana script, which also uses RegExp lookaheads. As it turns out, the lookaheads were fine – the negative lookbehind was not.

To be fair, regexr.com did warn me that negative lookbehind might not be supported by all browsers. And in my defense, I did put that part in a try...catch block. Too bad that regular expression literals are compiled when the script is loaded, and not during runtime, so the try...catch block didn’t help at all :sweat_smile:

Version 1.5 patch-notes:

Bugfix for browsers not supporting RegExp negative lookbehind

Waterfox doesn’t support negative lookbehind in regular expressions, which caused version 1.4 to not work at all in that browser. With version 1.5 it should work now. However, if your browser doesn’t support negative lookbehind, there is a rare case which will lead to wrong results: if you edit or quote a post that contains > in the ruby base, and then let IME2Furigana convert the ruby markup back to furigana markup, the > won’t get sanitized to > and IME2Furigana won’t be able to parse the resulting furigana markup.

Example: 2 > 1(wrong) will be back-converted to <2 > 1>[wrong] instead of <2 &gt; 1>[wrong]. The latter can be parsed by IME2Furigana, while the former can’t.

I doubt that this will ever be an issue, so I’m currently not planning to fix this.

Please let me know if something doesn’t work.
Link to previous script version for downgrading in case version 1.5 doesn’t work for you