Page MenuHomePhabricator

Fix project hashtag regexp to stop matching terminal periods
ClosedPublic

Authored by epriestley on Oct 29 2014, 2:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 2:36 AM
Unknown Object (File)
Fri, Apr 12, 1:07 AM
Unknown Object (File)
Fri, Apr 12, 1:07 AM
Unknown Object (File)
Thu, Apr 11, 7:36 PM
Unknown Object (File)
Mon, Apr 8, 10:46 PM
Unknown Object (File)
Sun, Apr 7, 5:28 PM
Unknown Object (File)
Sat, Apr 6, 10:17 PM
Unknown Object (File)
Apr 1 2024, 4:11 PM
Subscribers

Details

Summary

Fixes T6416. The comment is consistent with intent, but the actual regexp doesn't quite work right. In particular, we incorrectly match #security. as security. (with a period) instead of security (with no period).

Since this stuff is a pain to test and I evidently got it wrong in this case in D8703, make it unit testable.

Test Plan

Added unit tests. Also:

Screen_Shot_2014-10-29_at_7.41.48_AM.png (548×614 px, 39 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix project hashtag regexp to stop matching terminal periods.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, chad.

The preg_quote() "misuses" are safe because we use (...) as delimiters.

btrahan edited edge metadata.
This revision is now accepted and ready to land.Oct 29 2014, 3:13 PM
This revision was automatically updated to reflect the committed changes.