stepmania/stepmania-site — pull request #58 by dguzek (2014-12-02 03:26:28+00:00)
Title: fix Rainbow text for Forums

If a single page in a thread contained multiple instances of the rainbow markup, the existing JavaScript would make the text of each match the last instance found. This behavior exists in the original implementation ( https://github.com/xoxco/rainbow-text ) as can be seen here: http://jsfiddle.net/nzv2L259/

This is a simple fix: iterate over all instances of p.rainbow found and apply the rainbow() function to each individually.

There are valid arguments that doing this with a plain JavaScript for loop is faster; I'm not sure it's really worth worrying about at this time.