Don't specify the textTheme params within its regex
authorDarren <darren@darrenwhitlen.com>
Mon, 14 Apr 2014 13:47:41 +0000 (14:47 +0100)
committerDarren <darren@darrenwhitlen.com>
Mon, 14 Apr 2014 13:47:41 +0000 (14:47 +0100)
client/src/helpers/utils.js

index d83ca1fe8e2b6c001ce4a67cdcb85c1fbf3fccd9..5ccacb30758aefc682f355735d280a5dccd467c4 100644 (file)
@@ -539,9 +539,7 @@ function styleText(string_id, params) {
     }
 
     // Do the magic. Use the shorthand syntax to produce output.
-    text = style.replace(/%([TJHNCR])/g, function(match, key) {
-        key = '%' + key;
-
+    text = style.replace(/(%[A-Z])/g, function(match, key) {
         if (typeof params[key.toUpperCase()] !== 'undefined')
             return params[key.toUpperCase()];
     });