config: Handle multiple trailing spaces before comment chars

config: Handle multiple trailing spaces before comment chars