make spaces around image links optional for matching.
list item formatting fix
fixes for nbsp around formatting elements.