Due to how the mentions of someone's names may occur, there is a chance that the rendering may parse mentions recursively. For example, if you replace @mentions with mentions then try to highlight that, yet the code is @[mentions] then you may end up replacing things over and over.