REFCTOR: s/event/policy

REFCTOR: s/event/policy

diff --git a/assets/javascripts/discourse/controllers/policy-builder.js.es6 b/assets/javascripts/discourse/controllers/policy-builder.js.es6
index 7fcd957..0ce11c3 100644
--- a/assets/javascripts/discourse/controllers/policy-builder.js.es6
+++ b/assets/javascripts/discourse/controllers/policy-builder.js.es6
@@ -87,12 +87,12 @@ export default Controller.extend(ModalFunctionality, {
   },
 
   _replaceRaw(form, raw) {
-    const eventRegex = new RegExp(`\\[policy\\s(.*?)\\]`, "m");
-    const policyMatches = raw.match(eventRegex);
+    const policyRegex = new RegExp(`\\[policy\\s(.*?)\\]`, "m");
+    const policyMatches = raw.match(policyRegex);
 
     if (policyMatches && policyMatches[1]) {
       const markdownParams = this._buildParams(form);
-      return raw.replace(eventRegex, `[policy ${markdownParams.join(" ")}]`);
+      return raw.replace(policyRegex, `[policy ${markdownParams.join(" ")}]`);
     }
 
     return false;

GitHub sha: 53555351

1 Like