changes the initial legend to a proper md format.