Page MenuHomePhabricator

insource fails to return highlights on some queries
Closed, InvalidPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 19 2018, 10:24 AM
Restricted Application added a project: Discovery. · View Herald TranscriptMay 19 2018, 1:22 PM
EBjune added a subscriber: EBjune.May 31 2018, 5:26 PM

Let's do some test cases and track down the issue

EBjune triaged this task as Normal priority.May 31 2018, 5:26 PM
EBjune moved this task from needs triage to This Quarter on the Discovery-Search board.
Vvjjkkii renamed this task from insource fails to return highlights on some queries to hpcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from hpcaaaaaaa to insource fails to return highlights on some queries.Jul 2 2018, 6:11 AM
CommunityTechBot lowered the priority of this task from High to Normal.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Restricted Application added a subscriber: Urbanecm. · View Herald TranscriptJan 29 2019, 6:53 PM
TJones updated the task description. (Show Details)Aug 19 2019, 6:08 PM
TJones updated the task description. (Show Details)Aug 19 2019, 6:12 PM
TJones added a subscriber: TJones.Aug 19 2019, 6:20 PM

@EBernhardson, I stumbled across this one again while looking at the phab board. Are you sure it is the problem you think it is? I don't think you have the right regex for what you intended. Cirrus doesn't support \w, so \w+ requires one or more literal w's. One hit is highlighted, and it looks like this: "[[freehosting|zdarma hostující]] [[wiki]]weby". It doesn't look like .+? is being respected either. I wonder if the other matches are actually super long or something so there's nothing to highlight in the snippet.

(I looked at a few of the ones that don't show a highlight—the snippet starts at the beginning of the page and they all have a detailed infobox on the page. If [[ is matching in the infobox and then a whooooole lot of text and then ]]w, that would explain it.)

A more focused regex that does what I think you were intending to do—insource:/(\[\[[^\[\]]+?\]\])([a-z0-9_]+)/ (link)—seems to highlight appropriately.

What do you think? Can we close this one? (Or convert it to adding support for \w and .+? ?!)

TJones updated the task description. (Show Details)Aug 21 2019, 3:40 PM
TJones updated the task description. (Show Details)
TJones closed this task as Invalid.Aug 21 2019, 3:48 PM

Closing after talking to @EBernhardson a bit more.