You need to check el$options$engine == 'r' in addition to el$type == 'code_chunk', in case there are code chunks of other languages. You don't need xfun::read_utf8(), but can just pass the path to crack(), i.e., litedown::crack(file).
I'm okay with whatever license you prefer. It's just a short piece of code.
BTW, I just took a quick look at flashr, and I really loved the idea! It looks very interesting and helpful! I have had a lot of pain myself in teaching my kids Chinese characters, and have also been thinking of trying flash cards. I've written a simple app a few years ago, which was too boring to them and also very inefficient: https://yihui.org/cn/kids/2021/02/chars/