Fixed bug where the formatter would apply inline formatting outside the current word in if the selection was collapsed.