Input generated with this leads to O(n^2) both in time and output size:
$ python -c 'N=1000; print("[x]: " + "x" * N + "\n[x]" * N)'
(same as mity/md4c#238; cmark seems to limit number of link. ref. defs instantiations in some way so it is not vulnerable.)