fix StringIndexOutOfBoundsException when DocLink is [[foo.bar::]]