diff options
| author | jmoenig <jens@moenig.org> | 2013-08-01 11:49:35 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-08-01 11:49:35 +0200 |
| commit | 8dde1684f146457b9b6dd054f2e1a99a3d59cce7 (patch) | |
| tree | e5d5a4c8cdce0ef95e68f62b7f87731144dbf21e | |
| parent | 6fa1fcd87637cae8f0ad76951b7b389db6bfa969 (diff) | |
| download | snap-yow-8dde1684f146457b9b6dd054f2e1a99a3d59cce7.tar.gz snap-yow-8dde1684f146457b9b6dd054f2e1a99a3d59cce7.zip | |
"whitespace" & other options in SPLIT reporter's dropdown
still hidden in dev mode
| -rw-r--r-- | blocks.js | 7 | ||||
| -rwxr-xr-x | history.txt | 4 | ||||
| -rw-r--r-- | threads.js | 17 |
3 files changed, 22 insertions, 6 deletions
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-July-31'; +modules.blocks = '2013-August-01'; var SyntaxElementMorph; var BlockMorph; @@ -798,7 +798,10 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { null, // text false, // numeric? { - '--line--' : ['--line--'] + 'whitespace' : ['whitespace'], + 'line' : ['line'], + 'tab' : ['tab'], + 'cr' : ['cr'] }, false // read-only ); diff --git a/history.txt b/history.txt index f60dd59..5fd3680 100755 --- a/history.txt +++ b/history.txt @@ -1833,3 +1833,7 @@ ______ 130731 ------ * Blocks, Threads, Objects: experimental text SPLIT primitive in the operators category + +130801 +------ +* Blocks, Threads: "whitespace" & other options in SPLIT reporter's dropdown @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2013-July-31'; +modules.threads = '2013-August-01'; var ThreadManager; var Process; @@ -2003,10 +2003,19 @@ Process.prototype.reportUnicodeAsLetter = function (num) { Process.prototype.reportTextSplit = function (string, delimiter) { var str = (string || '').toString(), del; - - if (this.inputOption(delimiter) === '--line--') { + switch (this.inputOption(delimiter)) { + case 'line': del = '\n'; - } else { + break; + case 'tab': + del = '\t'; + break; + case 'cr': + del = '\r'; + break; + case 'whitespace': + return new List(str.trim().split(/[\t\r\n ]+/)); + default: del = (delimiter || '').toString(); } return new List(str.split(del)); |
