Changed git ignore and logic for non closing elements