FIX: ensures a new policy is always surrounded with linebreaks (#16)

FIX: ensures a new policy is always surrounded with linebreaks (#16)

diff --git a/assets/javascripts/discourse/controllers/policy-builder.js.es6 b/assets/javascripts/discourse/controllers/policy-builder.js.es6
index f17f57f..0ac3b6a 100644
--- a/assets/javascripts/discourse/controllers/policy-builder.js.es6
+++ b/assets/javascripts/discourse/controllers/policy-builder.js.es6
@@ -32,7 +32,7 @@ export default Controller.extend(ModalFunctionality, {
 
     const markdownParams = this._buildParams(this.form);
     this.toolbarEvent.addText(
-      `[policy ${markdownParams.join(" ")}]\n[/policy]`
+      `\n\n[policy ${markdownParams.join(" ")}]\n[/policy]\n\n`
     );
     this.send("closeModal");
   },

GitHub sha: 780df052

1 Like

This commit appears in #16 which was approved by markvanlan. It was merged by jjaffeux.