
Bayley, Alistair wrote:
Markdown looks a lot like Wiki source to me i.e. it looks like the text source for a Wiki page. It seems to serve the same purpose i.e. well-formatted plain text intended for conversion to HTML.
Exactly.
Many (most?) Wiki engines use straightforward regex substitution to convert the text source into HTML, rather than implement a lexer/parser/pretty-printer combination. Obviously this makes for a fairly simple implementation. Mind you, some of the regex's are quite complex...
You're right, even the Markdown itself implemented that way (Perl). Of course, building unnecessarily layers of abstraction is no good but my goals are more educational that practial. Plus, sometimes you need to complicate things to simplify them. ;-)