[Wikitext-l] So, a better algorithm for apostrophes?

Steve Bennett stevagewp at gmail.com
Wed Nov 28 01:39:04 UTC 2007


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



More information about the Wikitext-l mailing list