Page MenuHomePhorge

Remarkup: minor refactor to identify anchor and relative URIs
AbandonedPublic

Authored by valerio.bozzolan on Mar 23 2023, 09:20.
Tags
None
Referenced Files
F3351282: D25082.1743785351.diff
Thu, Apr 3, 16:49
F3351281: D25082.1743785349.diff
Thu, Apr 3, 16:49
F3351280: D25082.1743785347.diff
Thu, Apr 3, 16:49
F3351279: D25082.1743785345.diff
Thu, Apr 3, 16:49
F3349268: D25082.1743751431.diff
Thu, Apr 3, 07:23
F3349266: D25082.1743751429.diff
Thu, Apr 3, 07:23
F3349263: D25082.1743751426.diff
Thu, Apr 3, 07:23
F3343058: D25082.1743673469.diff
Wed, Apr 2, 09:44

Details

Summary

This modification should not change anything logically.

This change simplifies these checks:

  • identify an anchor
  • identify a relative URI

https://we.phorge.it/T15182

The methods are introduced in PhutilRemarkupRule since that
is the parent class of these children classes:

  • PhutilRemarkupDocumentLinkRule
  • PhutilRemarkupHyperlinkRule

Ref T15182

Test Plan
  • Just check that nothing has been changed logically

Diff Detail

Repository
rP Phorge
Branch
T15161-remarkup-internal-links-refactor
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/infrastructure/markup/markuprule/PhutilRemarkupRule.php:115XHP25Spaces Inside Parentheses
Warningsrc/infrastructure/markup/markuprule/PhutilRemarkupRule.php:125XHP25Spaces Inside Parentheses
Unit
Test Failures
Build Status
Buildable 153
Build 153: arc lint + arc unit

Unit TestsFailed

TimeTest
755 msPhabricatorCelerityTestCase::testCelerityMaps
Assertion failed, expected 'true' (at PhabricatorCelerityTestCase.php:32): When this test fails, it means the Celerity resource map is out of date. Run `bin/celerity map` to rebuild it. ACTUAL VALUE
81 msPhabricatorAnchorTestCase::testAnchors
8 assertions passed.
1,065 msPhabricatorConduitTestCase::testConduitMethods
1 assertion passed.
407 msPhabricatorInfrastructureTestCase::testApplicationsInstalled
1 assertion passed.
355 msPhabricatorInfrastructureTestCase::testRejectMySQLNonUTF8Queries
1 assertion passed.
View Full Test Results (1 Failed · 21 Passed · 1 Skipped)

Event Timeline