Project

General

Profile

Feature #35677 » 0001-preserve-leading-spaces-when-using-the-Quote-functio.patch

Jens Krämer, 2021-08-03 12:53

View differences:

public/javascripts/jstoolbar/markdown.js
153 153
    wiki: function() {
154 154
      this.encloseLineSelection('','',function(str) {
155 155
        str = str.replace(/\r/g,'');
156
        return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
156
        return str.replace(/(\n|^)( *)([^\n]*)/g,"$1> $2$3");
157 157
      });
158 158
    }
159 159
  }
......
167 167
    wiki: function() {
168 168
      this.encloseLineSelection('','',function(str) {
169 169
        str = str.replace(/\r/g,'');
170
        return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
170
        return str.replace(/(\n|^) *(> ?)?( *)([^\n]*)/g,"$1$3$4");
171 171
      });
172 172
    }
173 173
  }
public/javascripts/jstoolbar/textile.js
153 153
    wiki: function() {
154 154
      this.encloseLineSelection('','',function(str) {
155 155
        str = str.replace(/\r/g,'');
156
        return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
156
        return str.replace(/(\n|^)( *)([^\n]*)/g,"$1> $2$3");
157 157
      });
158 158
    }
159 159
  }
......
167 167
    wiki: function() {
168 168
      this.encloseLineSelection('','',function(str) {
169 169
        str = str.replace(/\r/g,'');
170
        return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
170
        return str.replace(/(\n|^) *(> ?)?( *)([^\n]*)/g,"$1$3$4");
171 171
      });
172 172
    }
173 173
  }
    (1-1/1)