If a user types "?p ^wdt:" and then presses Ctrl+space, the auto completion shows a "Unknown prefix '^wdt:'" message.
If a user types "?p wdt:P31/wdt:" and then presses Ctrl+space, using autocomplete replaces the entire path, including the "wdt:P31". Similarly, the "|" , "(", and "!" operators all break autocomplete.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Rewrite of getCurrentWord | wikidata/query/gui | master | +16 -19 |
Related Objects
Related Objects
- Mentioned In
- rWDQG5f1935eb3b69: Clean illegal characters from prefix
rWDQG8072319cbdda: Rewrite of getCurrentWord
rWDQG47d774b77f11: Rewrite of getCurrentWord
rWDQG280abe915cb0: Rewrite of getCurrentWord
rWDQGa83a9c3de28b: Rewrite of getCurrentWord - Mentioned Here
- P31 Fork of P29 (An Untitled Masterwork)
Event Timeline
Comment Actions
(Sorry, in case this wasn't clear, the behaviour I'm referring to is on the Wikidata Query Service, https://query.wikidata.org .)
Comment Actions
AFAIR right now the code uses \S to grab words, I think it should use something like \w.
Comment Actions
Change 272755 had a related patch set uploaded (by Jonas Kress (WMDE)):
Clean illegal characters from prefix
Comment Actions
I fixed the first one, but I think the second one needs a complete rewrite of getCurrentWord() in wikibase-rdf-hint.js.
Comment Actions
If we can't handle the second one yet, we should at least make it so that it doesn't kill the wdt:P31/ part, otherwise it is rather weird. I think it would be better not having completion in this case (then I just insert space after /, complete and remove space) than have it ruin my already written code.