Ticket #766: ticket766.patch

File ticket766.patch, 1.8 KB (added by FND, 3 years ago)
  • core/js/TiddlyWiki.js

    diff --git a/core/js/TiddlyWiki.js b/core/js/TiddlyWiki.js
    index d97707e..7bb4070 100644
    a b  
    151151        return textOut.join(""); 
    152152}; 
    153153 
    154 TiddlyWiki.prototype.slicesRE = /(?:^([\'\/]{0,2})~?([\.\w]+)\:\1\s*([^\n]+)\s*$)|(?:^\|([\'\/]{0,2})~?([\.\w]+)\:?\4\|\s*([^\|\n]+)\s*\|$)/gm; 
     154TiddlyWiki.prototype.slicesRE = /(?:^([\'\/]{0,2})~?([\.\w]+)\:\1[\t\x20]*([^\n]+)[\t\x20]*$)|(?:^\|([\'\/]{0,2})~?([\.\w]+)\:?\4\|[\t\x20]*([^\n]+)[\t\x20]*\|$)/gm; 
    155155 
    156156// @internal 
    157157TiddlyWiki.prototype.calcAllSlices = function(title) 
  • core/tests/jsspec/TiddlyWiki.jsspec.js

    diff --git a/core/tests/jsspec/TiddlyWiki.jsspec.js b/core/tests/jsspec/TiddlyWiki.jsspec.js
    index 8196a0c..dc669f4 100644
    a b  
    172172                value_of(actual).should_be(expected); 
    173173        }, 
    174174 
    175  
    176175        'should ignore colons in slice values (colon notation)': function() { 
    177176                var title = "tiddler"; 
    178177                var text = "foo: bar: baz"; 
     
    197196                var expected = { "foo": "bar|baz" }; 
    198197                value_of(actual).should_be(expected); 
    199198        }, 
    200         /*'should ignore additional columns (table notation)': function() { 
     199        'should allow pipes in slice values (table notation)': function() { 
    201200                var title = "tiddler"; 
    202201                var text = "|foo|bar|baz|"; 
    203202                store.saveTiddler(title, title, text); 
    204203                var actual = store.calcAllSlices(title); 
    205                 var expected = { foo: "bar" }; 
     204                var expected = { "foo": "bar|baz" }; 
    206205                value_of(actual).should_be(expected); 
    207         },*/ 
     206        }, 
    208207 
    209208        'should retrieve slices containing PrettyLinks (colon notation)': function() { 
    210209                var title = "tiddler";