Note: This still happens in Discourse version 2.4.0.beta9 (c15d702ae6):
In a Private Message, URLs like https://gitpod.io/#snapshot/abcd-1234 still get wrongly converted to https://gitpod.io/#snapshot%2Fabcd-1234
I notice that Discourse 2.4.0.beta10 is out now – may try to upgrade and see if that helps.