Difference is certainly not nice. But in this case i can't say immediately, is this bug of markdown-it or of reference commonmark implementation (not sure what spec says).
If you have time, could you ask @jgm in commonmark tracker, how your last case is expected to work (according to spec)? Anyway, i think they can wish to add this case into spec. We test all spec samples and fix any deviations ASAP. Also we track pathological tests of commonmark.js.