Kobo prefix logic
Here's all the logic used to generate the prefixes. I've tested it against libnickel, and it's also based on the disassembly of DictionaryParser::htmlForWord (it was slightly annoying that most of the Qt stuff was inlined). I've simplified it and improved the performance, and also left in the original code for reference.
I'll write some proper documentation and make a thread when I finish dictutil later.
Here is the code:
https://sourcegraph.com/github.com/g...util.go#L30-86
v1/v2 dictionary stuff
And here are some useful notes about v1/v2 dictionaries (this hasn't ever been discussed, or even noticed before AFAIK):
https://pgaskin.net/dictutil/dicthtml/v1v2