improved the markdown cleaning