Auto merge of #76684 - jyn514:refactor-intra-links, r=manishearth

Refactor intra doc link code

I got tired of `fold_item` being 500 lines long.
This is best reviewed one commit at a time with whitespace changes hidden.
There are no logic changes other than the last commit making a parameter checked by the caller instead of the callee.

r? `@Manishearth`
This commit is contained in:
bors 2020-09-15 07:42:13 +00:00
commit c1589cc819

File diff suppressed because it is too large Load Diff