Prepare Diffusion for hovercards

Summary:
Move Diffusion to be hovercard-ready, and expand our ability to resolve commit references.

  - Link unqualified hashes of 7 characters or more which match a commit.
  - Link qualified hashes of 5 characters or more which match a commit.
  - Support `{...}` syntax.

Test Plan: {F33896}

Reviewers: chad, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5121
This commit is contained in:
epriestley
2013-02-27 08:04:54 -08:00
parent b5da7b3723
commit fe78944c9d
11 changed files with 283 additions and 69 deletions

View File

@@ -30,6 +30,12 @@ final class PhabricatorApplicationDiffusion extends PhabricatorApplication {
);
}
public function getRemarkupRules() {
return array(
new DiffusionRemarkupRule(),
);
}
public function getRoutes() {
return array(
'/r(?P<callsign>[A-Z]+)(?P<commit>[a-z0-9]+)'