issue #169: make sure ldoc is not nil before checking config
issue #180: make target function clearer with highlighting