graphite-project/graphite-web — pull request #410 by ajablonski (2013-08-28 17:33:18+00:00)
Title: Fix bug where SVG output would sometimes have extra </g> tag

When generating SVG images, if there is no "\\" tag:

![image](https://f.cloud.github.com/assets/2461496/1043861/0c045c42-1007-11e3-8b0c-e4e3e559cbb6.png)

This fix adds the "\" tag only if the regex in line 498 finds at least one match (if onHeaderPath is called at least once, which would give line 501 something to replace).