Page MenuHomePhorge

Update diffusion browse to generate Table of Contents when viewed as remarkup
AbandonedPublic

Authored by Sten on Nov 5 2023, 15:54.

Details

Summary

Update the code such that when viewing a document in diffusion as remarkup, a table of contents (TOC) will automatically be generated, provided that the document has at least 2 headers!

Also fix t_block_interpreterests__/remarkup/interpreter-test.txt which was failing prior to this change (arc unit src/infrastructure/markup/remarkup/tests__/PhutilRemarkupEngineTestCase.php) - the block pattern match has been tightened up since this test case such that phutil_fake_test_block_interpreter is longer even recognised!

Fixes T15660

Test Plan

Diffusion:

Diviner:

  • Update a diviner document
  • Run bin/diviner generate
  • Confirm the diviner document TOC is unaffected

Differential:

  • Create a diff with headers in the description. Confirm all works as before with no TOC.
  • Create a diff comment with headers. Confirm all works as before with no TOC.

Diff Detail

Repository
rP Phorge
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 881
Build 881: arc lint + arc unit