Improvements to reformat-markup