That can't be right.  I think you meant, "Reduce any runs of multiple underscores to a single SPACE" and then "Trim any leading or trailing spaces"

On Sep 6, 2021, at 12:15 AM, Bryan Davis <bd808@wikimedia.org> wrote:

* Replace all whitespace characters with underscores (`_`)
* Reduce any runs of multiple underscores to a single underscore
* Trim any leading or trailing underscores from the string
* Capitalize the string