I'm also parsing raw text, albeit rather naively, by calling Wikipedia's API on the fly. Is this the right way to do it?

Yes, I thought of triggering the thing with X references and it would be great if it looked something like
posted by [UserVoice Jag Talon] • 5 years and 10 months ago Link