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] • 6 years and 10 months ago Link