How about this:
Word'''word -> always apostrophe+italics Word''''word -> always apostrophe+bold
Advantages: * French and Italian examples work correctly all the time * You can parse it with single-token lookahead. * No need to count matched/mismatched bold/italics * Broken wikitext at the end of the line does not interfere with correct wikitext at the start of the line * Simpler to understand than the current rule.
Disadvantages: * You lose the ability to easily apply bold mid-word. * The ambiguity will arise more often, so more people will have to know that ''' is not always bold. Not that it's always bold at the moment, but you know...
Thoughts?
Steve