improve handling of <div> with MMD inside