mdocml: upstream sync of lib.in