see title. Fixes T4549.
Details
Details
- Reviewers
epriestley chad - Maniphest Tasks
- T4549: Generate ToC while rendering 'readme.md' files in diffusion
- Commits
- Restricted Diffusion Commit
rP740757fd9b7a: Diffusion - add ToC for readme files
made a readme that had some headers and observed a nice ToC
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
This implementation looks correct to me, although I'm not 100% convinced the feature is valuable on the balance. If we suppose most READMEs are small and have, like, 2-3 sections (and the actual docs are, like, not in a giant README file) then I could see this getting in the way more than it helps. Your call, though; we can also see if anyone complains, or we could activate the TOC only at some threshold (like at least 5 sections).
Comment Actions
Let's see what people say / do not say. :) I think this is going to work out quite well as I think READMEs tend to be very sparse (ToC won't render) or very dense (ToC is valuable).