So, to be clear, you're suggesting that we subst:
complicated
constructs by their clear, simple equivalents, and then define the
grammar based on the target of that //subst//itution?
Ok, yeah, that sounds like it might be slightly more possible.
Helps pedagogically as well, as long as users are informed that the
system "slightly modified their markup to make it easier to
understand."
Of course, some people might get annoyed by *that*, and they'll be
power users... You really can't win, here, can you?
My original idea was not to save the tidied version but to tidy the
page every time it's parsed. Saving it is an option. Whether it's a
good idea or not probably depends on how much the markup gets changed
- if it's a lot it might confuse users too much. It could easily be
made a configuration option, though.