From fc6420d606a7421ecf932ba43bb8e677abba6ed1 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 6 Jul 2015 15:57:37 -0500
Subject: [PATCH] redactor: Fix spurious `}` appearing from variable typeahead

---
 js/redactor-plugins.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/js/redactor-plugins.js b/js/redactor-plugins.js
index 33edff821..8f01f5f6c 100644
--- a/js/redactor-plugins.js
+++ b/js/redactor-plugins.js
@@ -1804,6 +1804,8 @@ RedactorPlugins.contexttypeahead = function() {
     },
 
     select: function(item, event) {
+      // Collapse multiple textNodes together
+      (this.selection.getBlock() || this.$editor.get(0)).normalize();
       var current = this.selection.getCurrent(),
           sel     = this.selection.get(),
           range   = this.sel.getRangeAt(0),
-- 
GitLab