eregs/regulations-site — pull request #654 by cmc333333 (2014-04-15 15:02:38+00:00)
Title: Simplify location-replace logic - fewer ops, easier to understand

Previously, we'd step through each location that needed to be replaced. We'd replace the string at that position, re-find all offsets, and repeat.

This patch simplifies that logic, building a list of strings, including a substitution where needed. The list is then joined.