Split Block: Add a character option for clarity

This also allows the split block to be used more easily in a HOF
pull/3/merge
Michael Ball 2014-07-17 12:02:07 -07:00
rodzic 4fa53772f5
commit 440cd340a5
2 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -836,6 +836,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
null, // text
false, // numeric?
{
'character' : ['character'],
'whitespace' : ['whitespace'],
'line' : ['line'],
'tab' : ['tab'],

Wyświetl plik

@ -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();
}