cleanup in markdown block parsers
generalize the protection against endless recursion of nested blocks
between markdown and rst