Page MenuHomePhabricator

chomp leading spaces and tabs from lookahead function in wikidata field entry
Closed, ResolvedPublic

Description

With wikidata, following the recent update, when text is pasted with leading spaces or a tab, the lookahead function used to be able to ignore the leading characters and focus on the text for its search. The chomp function has disappeared.

a simple example "

female given name
" is a text copy from the description field and it used to be able to be pasted into "instance of", and remove the superfluous spaces in its lookup. Ability lost.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 27 2017, 12:22 AM

as a comment, I believe that we also used to have a terminating chomp of trailing space as part of the lookahead function, and now the addition of a space is literal in lookahead. If that is purposeful behaviour, okay; if it is not, then maybe it can be looked at again.

There are benefits in either scheme in having a literal space, though if you have the space and don't identify that in the result, it can lead to thinking that a term does not exist and either creating it (as duplicate) or not linking an item.

Smalyshev moved this task from Backlog to Next on the User-Smalyshev board.

Change 387025 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/Wikibase@master] Add special case handling for some forms of IDs

https://gerrit.wikimedia.org/r/387025

thiemowmde closed this task as Resolved.Nov 8 2017, 11:19 AM
thiemowmde removed a project: Patch-For-Review.
thiemowmde moved this task from ready to go to in progress on the Wikidata board.
thiemowmde assigned this task to Smalyshev.

Change 387025 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add special case handling for some forms of IDs

https://gerrit.wikimedia.org/r/387025