Page MenuHomePhabricator

Remarkup links to link to short url instead of long and fix commenting on Phurl's
ClosedPublic

Authored by lpriestley on Nov 13 2015, 10:54 PM.
Tags
None
Referenced Files
F19087216: D14477.diff
Dec 3 2025, 12:03 AM
F19073328: D14477.id.diff
Dec 1 2025, 1:41 AM
F19069298: D14477.id35079.diff
Nov 30 2025, 1:40 PM
F19029742: D14477.id35079.diff
Nov 24 2025, 6:52 PM
F19029741: D14477.id35017.diff
Nov 24 2025, 6:52 PM
F18851501: D14477.id.diff
Oct 31 2025, 1:50 AM
F18850099: D14477.diff
Oct 30 2025, 2:28 PM
F18783081: D14477.id35080.diff
Oct 13 2025, 3:31 AM
Subscribers

Details

Summary

Ref T6049, remarkup links to use short URLs and make commenting on Phurl's actually work

Test Plan
  • Create Phurl U123
  • Comment on that Phurl ((123))

Comment should link to /u/123

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lpriestley retitled this revision from to Remarkup links to link to short url instead of long and fix commenting on Phurl's.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/phurl/remarkup/PhabricatorPhurlLinkRemarkupRule.php
10

(Possibly we should make ((U123)) and ((123)) equivalent at some point, or maybe even require the U... form.)

51–52

I think these should probably become methods on PhurlURL, like getDisplayName() and getRedirectURI() or similar: specifically, I think they'll have more callsites.

The $redirect logic should also probably be like this?

if (strlen($phurl->getAlias())) {
  return '/u/alias';
} else {
  return '/u/id';
}
This revision is now accepted and ready to land.Nov 15 2015, 4:44 PM
lpriestley marked an inline comment as done.
lpriestley edited edge metadata.

((U123)) should also remarkup as a redirect link to the URI for U123

This revision was automatically updated to reflect the committed changes.