Fix emphasis escape sequence detection

@robin850 - Fixes issues #214 and #369