Page MenuHomePhabricator

Generate more friendly anchor names for header sections in Remarkup
ClosedPublic

Authored by epriestley on Sep 18 2019, 10:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 3:07 AM
Unknown Object (File)
Thu, Nov 21, 9:19 AM
Unknown Object (File)
Fri, Nov 15, 10:08 PM
Unknown Object (File)
Tue, Nov 12, 7:57 PM
Unknown Object (File)
Thu, Oct 31, 8:02 PM
Unknown Object (File)
Sun, Oct 27, 12:48 AM
Unknown Object (File)
Oct 22 2024, 1:42 AM
Unknown Object (File)
Oct 20 2024, 4:49 AM
Subscribers
None

Details

Summary

Depends on D20820. Ref T13410. We currently cut anchor names in the middle, don't support emoji in anchors, and generate relatively short anchors.

Generate slightly longer anchors, allow more unicode, and try not to cut things in the middle.

Test Plan

Created a document with a variety of different anchors and saw them generate more usable names.

Diff Detail

Repository
rP Phabricator
Branch
anchor2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23466
Build 32244: Run Core Tests
Build 32243: arc lint + arc unit

Unit TestsFailed

TimeTest
240 msPhutilRemarkupEngineTestCase::testEngine
Assertion failed, expected values to be equal (at PhutilRemarkupEngineTestCase.php:67): Failed to markup HTML in file 'toc.txt'. Expected vs Actual Output Diff --- Old Value
1 msAlmanacNamesTestCase::testServiceOrDeviceNames
30 assertions passed.
0 msAlmanacServiceTypeTestCase::testGetAllServiceTypes
1 assertion passed.
0 msAphrontHTTPSinkTestCase::testHTTPHeaderNames
2 assertions passed.
0 msAphrontHTTPSinkTestCase::testHTTPSinkBasics
3 assertions passed.
View Full Test Results (1 Failed · 390 Passed)

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 18 2019, 10:25 PM
Harbormaster failed remote builds in B23466: Diff 49640!
  • Fix library map.
  • Add test coverage.
  • Clean up a few behaviors.
Harbormaster returned this revision to the author for changes because remote builds failed.Sep 24 2019, 3:57 PM
Harbormaster failed remote builds in B23472: Diff 49645!
  • Fix tests and provide an explicit anchor rendering mode.
This revision was not accepted when it landed; it landed in state Needs Review.Sep 24 2019, 6:03 PM
This revision was automatically updated to reflect the committed changes.