kopia lustrzana https://github.com/backface/turtlestitch
Split Block: Add a character option for clarity
This also allows the split block to be used more easily in a HOFpull/3/merge
rodzic
4fa53772f5
commit
440cd340a5
|
@ -836,6 +836,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
|
|||
null, // text
|
||||
false, // numeric?
|
||||
{
|
||||
'character' : ['character'],
|
||||
'whitespace' : ['whitespace'],
|
||||
'line' : ['line'],
|
||||
'tab' : ['tab'],
|
||||
|
|
|
@ -2148,6 +2148,9 @@ Process.prototype.reportTextSplit = function (string, delimiter) {
|
|||
break;
|
||||
case 'whitespace':
|
||||
return new List(str.trim().split(/[\t\r\n ]+/));
|
||||
case 'character':
|
||||
del = '';
|
||||
break
|
||||
default:
|
||||
del = (delimiter || '').toString();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue