Endophora
Endophora refers to the phenomenon of expressions that derive their reference from something within the surrounding text (endophors).
For example, in the sentences "I saw Sally yesterday. She was lying on the beach", "she" is an endophoric expression because it refers to something already mentioned in the text, i.e. "Sally".