Fixed escaping of ~ in markdown output