Diviner: Parse generic types in doc blocks better
Summary:
Type hints for parameters can be generic, such as `array<string,int>`.
Some of these contain spaces, like `array<string, int>`, which was parsed incorrectly previously.
This resulted in a line like ` * @param map<string, string> $attributes (optional) A map of tag attributes.` rendering as
`map<string, | $attributes | string> $attributes (optional) A map of tag attributes.` instead of
`map<string,string> | $attributes | $attributes (optional) A map of tag attributes.`.
Closes T16499
Test Plan:
* Run `./bin/diviner generate` on git master
* Look at the "Parameters" box on http://phorge.localhost/book/dev/function/phutil_tag/
* Apply this patch
* Run `./bin/diviner generate --clean`
* Look at the "Parameters" box on http://phorge.localhost/book/dev/function/phutil_tag/
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16499
Differential Revision: https://we.phorge.it/D26752