clear formatting safety fix to only delete outer node if a span
clear formatting fix