Collapse redundant logic
Fix bug in mtg2html

Now it won't enter an infinite loop when using a format that matches
the regex '\[\[[^]]*\]\]'. E.g. mtg2html -f '[[%s]]' won't fail.