Trim markdown output