Index: trunk/extensions/ProofreadPage/proofread_index.js |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | |
15 | 15 | function proofreadpage_index_init() { |
16 | 16 | |
17 | | - if(!self.proofreadpage_debug) return; |
| 17 | + if(!self.proofreadpage_debug) return; |
18 | 18 | |
19 | 19 | var toolbar = document.getElementById("toolbar"); |
20 | 20 | toolbar.parentNode.removeChild(toolbar); |
— | — | @@ -86,6 +86,9 @@ |
87 | 87 | param_name = m[0]; |
88 | 88 | |
89 | 89 | value = form.elements[param_name].value; |
| 90 | + //remove trailing \n |
| 91 | + value = value.replace(/\n$/,''); |
| 92 | + //replace pipe symbol |
90 | 93 | value = value.replace(/\|/g,'{{!}}'); |
91 | 94 | //not for links! |
92 | 95 | value = value.replace(/\[\[(.*?)\{\{!\}\}(.*?)\]\]/g,'[[$1|$2]]'); |