withLineEnd function

Add line end