Page MenuHomePhabricator

Make `#?` work properly
ClosedPublic

Authored by epriestley on Oct 1 2014, 7:36 PM.
Tags
None
Referenced Files
F18854461: D10618.id.diff
Sat, Nov 1, 12:19 AM
F18850590: D10618.diff
Thu, Oct 30, 6:03 PM
F18765977: D10618.id.diff
Tue, Oct 7, 2:15 PM
F18759341: D10618.diff
Mon, Oct 6, 3:17 AM
F18715696: D10618.id25491.diff
Sep 29 2025, 10:36 AM
F18712205: D10618.diff
Sep 29 2025, 5:18 AM
F18622099: D10618.diff
Sep 15 2025, 10:28 AM
F18095399: D10618.id25495.diff
Aug 7 2025, 11:25 PM
Subscribers
Tokens
"Doubloon" token, awarded by btrahan.

Details

Reviewers
btrahan
chad
Maniphest Tasks
T6223: ?
Commits
Restricted Diffusion Commit
rPfda0b086b565: Make `#?` work properly
Summary

Ref T6223. Two issues:

  • We don't use /u mode on these regexps. Without /u, the \w/\W/\s/\S modifiers have bad behavior on non-ASCII bytes. Add the flag to use unicode mode, making \w and \s behave like we expect.
    • We might possibly want to do something different here eventually (for example, if the /u flag has some huge performance penalty) but this seems OK for now.
  • We use \b (word boundary) to terminate the match, but ? is not a word character. Use (?!\w) instead ("don't match before a word character") which is what we mean.
Test Plan

Screen_Shot_2014-10-01_at_12.32.53_PM.png (108×335 px, 10 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make `#🐳` work properly.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, chad.
epriestley added a task: T6223: ?.
chad edited edge metadata.

???

This revision is now accepted and ready to land.Oct 1 2014, 7:40 PM
This revision was automatically updated to reflect the committed changes.