Automatic selection handling for bold, italic, inline code