The functions stopped at the end/start block marker (respectively)
instead of returning the following line. This caused issues when the
function was subsequently called in markdown mode since the start and
end block markers are the same.
This fixes#407