Simetrical wrote:
This is where we could redefine the behavior slightly. Have ''''' always be <b><i>. Then, if ''' occurs first, output </i></b><i>.
Not necessary. Much easier if you just define ''''' as a separate token.
''''' a '' b ''' => <b><i>a</i>b</b> ''''' a ''' b '' => <i><b>a</b>b</i>