shivawu/topcoder-greed — pull request #95 by vexorian (2013-12-13 04:34:33+00:00)
Title: Move Contest Category from StringUtil to own renderer.

In #85 we talked about moving the contest category renderer out of String Util.

This refactor also makes the Contest Category renderer render a Contest object. It makes the syntax easier. Also, the default now makes SRMs render as "SRM" and hen doing "srm=1" it will use a single name for each SRM (Although SRM 599 test practice room renders as "SRM 599").

// ${Contest;category}
// ${Contest;category("srm=1")}
// ${Contest;category("srm=2")}
// ${Contest;category("srm=10")}
// ${Contest;category("srm=100")}
// ${Contest;category("srm=25")}

Renders to :

// SRM
// SRM 599
// SRM 598-599
// SRM 590-599
// SRM 500-599
// SRM 575-599

In the future, we can add more options, like ability to split TCOs by year.