Attempt at better list markup.
Doesn't work for: templates in lists or explicit list block elements
(because it detects when it's in a list based on the parser), but it is
usually at least as good as the older version.
This kind of thing would be much easier if I represented the lists in
data rather than translating them as they are parsed. Not sure if I'll
do that soon though.