As I near completion of building my website, I am frustrated to find that the code is a chaotic mess. I failed to properly label sections of the code, such as "Navbar Code below," and neglected to add clear ending points. When debugging the code, I realized that it was scattered and disorganized, with empty spaces causing further confusion. For example:
/*Navbar Started*/
nav a{
margin: 0px 5px 0px 5px;
}
Further down in the code, I discovered:
#a1{
margin-left: 40px;
}
In this case, the margin style for #a1 conflicts with the styling for the link in the navbar. This is just one simple example of the issues I am facing.
Is there a tool or script available that can identify duplicate lines of code and consolidate them by either removing redundancies or combining all properties into one place? For instance:
#a1{
margin:5px;
padding:5px;
}
I am aware of my mistakes and the need for proper organization in my code. Unfortunately, manually sorting through everything would require an immense amount of time and effort.
If there isn't an existing solution, please inform me. I have a good understanding of Python and would be willing to develop a tool to assist novice developers like myself. Any contributions to this project would be greatly appreciated.