From b43a17acf599c3be018aa413a6e44ab61baf90ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Tue, 5 May 2015 10:14:19 +0200
Subject: [PATCH] Add pipe to end of link pasted w/o title

It is helpful if the pipe is still inserted by the linkwizard when there
is no title. This increases usability for beginners.
---
 lib/scripts/linkwiz.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js
index 7c383ffe4..bc850226f 100644
--- a/lib/scripts/linkwiz.js
+++ b/lib/scripts/linkwiz.js
@@ -244,9 +244,10 @@ var dw_linkwiz = {
                 so += dw_linkwiz.val.open.length;
                 link = dw_linkwiz.val.open+link;
             }
+            link += '|';
+            so += 1;
             if(stxt) {
-                link += '|'+stxt;
-                so += 1;
+                link += stxt;
             }
             if(dw_linkwiz.val.close) {
                 link += dw_linkwiz.val.close;
-- 
GitLab