You have no idea the rabbit hole I went down trying to help you with this and that is about the same solution I came up with. However, there is another option, but I will not say I solved the problem, but rather came up with an alternative worth investigating.
I took at look at the docs link you shared and learned they are on GitHub. Upon closer inspection, they use ASCIIDoctor (aka ASCIIDocs). It seems like a more advanced markdown language design for documentation where markdown seems to be more for just web presentation.
At any rate, it looks like the functionality for callouts is an out-of-box feature with the open source project and you can see how it works here:
Best I can tell, there are plugins for ASCIIDocs so you can use it with Jekyll (just not GitHub Pages), but it feels like that would be a lot of work since you already have a better, more Jekyll-friendly version.