1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 19:47:14 +00:00

Preserve leading spaces when using the Quote function (#35677).

Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@21170 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2021-08-13 03:10:39 +00:00
parent 39e212dd8f
commit 6bb4b15777
2 changed files with 4 additions and 4 deletions

View File

@ -153,7 +153,7 @@ jsToolBar.prototype.elements.bq = {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
return str.replace(/(\n|^)( *)([^\n]*)/g,"$1> $2$3");
});
}
}
@ -167,7 +167,7 @@ jsToolBar.prototype.elements.unbq = {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
return str.replace(/(\n|^) *(> ?)?( *)([^\n]*)/g,"$1$3$4");
});
}
}

View File

@ -153,7 +153,7 @@ jsToolBar.prototype.elements.bq = {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
return str.replace(/(\n|^)( *)([^\n]*)/g,"$1> $2$3");
});
}
}
@ -167,7 +167,7 @@ jsToolBar.prototype.elements.unbq = {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
return str.replace(/(\n|^) *(> ?)?( *)([^\n]*)/g,"$1$3$4");
});
}
}