Cleaned up text formatting markers.

The text formatting markers for bold, underline, italic, and strikethrough all had a couple problems depending on their usage. They've been adjusted to make sure they aren't surrounded by word characters before matching.