Page MenuHomePhabricator

Add a link in VE: handle span-wrapped entities and annotations when finding link recommendation phrases
Open, MediumPublic


Currently, AddLinkArticleTarget.prototype.annotateSuggestions can only locate phrases to turn into link recommendations that fall entirely within the same text node. If the phrase contains an annotation (e.g. we're looking for German cuisine but the HTML is <i>German</i> cuisine) or contains an entity that Parsoid wraps in a span (e.g. we're looking for cafés, but the HTML is caf<span typeof="mw:Entity" id="...">é</span>s), then the phrase does not fall entirely within one text node and we will fail to find it.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I made a (somewhat ambitious) proposal in T267694#6764244.

kostajh added a subscriber: kostajh.

I'm moving this into the post-release backlog, I would first like to see data from T278487: Instrumentation: Number of phrases not found in document before we decide to go down this path.

kostajh triaged this task as Medium priority.Apr 26 2021, 7:54 PM