From 2de9f5f3967f5f6c3d60e6793b0168cd6176f110 Mon Sep 17 00:00:00 2001 From: Eston Bond Date: Mon, 6 Dec 2010 18:03:26 -0800 Subject: [PATCH] Fixing backreference bug in WebKit --- .../frontend/public/javascript/gollum-editor/gollum.editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js b/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js index 65f6bbbd..b07a25df 100755 --- a/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js +++ b/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js @@ -484,6 +484,8 @@ debug('searching for ' + searchStr + ' to replace with ' + matches[i]); rt = rt.replace( searchStr, matches[i] ); } + // remove any excess backreferences from the replace string + rt = rt.replace( /\$[\d]/g, '' ); repText = rt; } else if ( repText == '' ) { debug('Search string is empty');