Skip to content

Commit

Permalink
Updated to 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
adammark committed Mar 7, 2012
1 parent c45af86 commit a67be55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 45 deletions.
18 changes: 3 additions & 15 deletions i18n/js/lib/markup.js
@@ -1,5 +1,5 @@
/*
Markup.js v1.5: http://github.com/adammark/Markup.js
Markup.js v1.5.3: http://github.com/adammark/Markup.js
MIT License
(c) 2011 Adam Mark
*/
Expand All @@ -13,16 +13,6 @@ var Mark = {
// argument delimiter
delimiter: ">",

// default language, for i18n
lang: "en",

// plural forms, for i18n
plurals: {
"en": function (msgs, n) {
return msgs[n === 1 ? 0 : 1];
}
},

// return a copy of array A or copy array A into array B (returning B)
_copy: function (a, b) {
b = b || [];
Expand Down Expand Up @@ -192,6 +182,7 @@ Mark.up = function (template, context, options) {

// loop through tags, e.g. {{a}}, {{b}}, {{c}}, {{/c}}
while ((tag = tags[i++])) {
result = undefined;
child = "";
selfy = tag.indexOf("/}}") > -1;
prop = tag.substr(2, tag.length - (selfy ? 5 : 4));
Expand Down Expand Up @@ -377,7 +368,7 @@ Mark.pipes = {
return str.split(separator || ",");
},
choose: function (bool, iffy, elsy) {
return !!bool ? iffy : elsy;
return !!bool ? iffy : (elsy || "");
},
toggle: function (obj, csv1, csv2, str) {
return csv2.split(",")[csv1.match(/\w+/g).indexOf(obj + "")] || str;
Expand Down Expand Up @@ -421,9 +412,6 @@ Mark.pipes = {
last: function (iter) {
return iter.idx === iter.size - 1;
},
pluralize: function (str, n) {
return Mark.plurals[Mark.lang](str.split(";;"), +n).trim();
},
call: function (obj, fn) {
return obj[fn].apply(obj, [].slice.call(arguments, 2));
},
Expand Down
18 changes: 3 additions & 15 deletions orientation/js/lib/markup.js
@@ -1,5 +1,5 @@
/*
Markup.js v1.5: http://github.com/adammark/Markup.js
Markup.js v1.5.3: http://github.com/adammark/Markup.js
MIT License
(c) 2011 Adam Mark
*/
Expand All @@ -13,16 +13,6 @@ var Mark = {
// argument delimiter
delimiter: ">",

// default language, for i18n
lang: "en",

// plural forms, for i18n
plurals: {
"en": function (msgs, n) {
return msgs[n === 1 ? 0 : 1];
}
},

// return a copy of array A or copy array A into array B (returning B)
_copy: function (a, b) {
b = b || [];
Expand Down Expand Up @@ -192,6 +182,7 @@ Mark.up = function (template, context, options) {

// loop through tags, e.g. {{a}}, {{b}}, {{c}}, {{/c}}
while ((tag = tags[i++])) {
result = undefined;
child = "";
selfy = tag.indexOf("/}}") > -1;
prop = tag.substr(2, tag.length - (selfy ? 5 : 4));
Expand Down Expand Up @@ -377,7 +368,7 @@ Mark.pipes = {
return str.split(separator || ",");
},
choose: function (bool, iffy, elsy) {
return !!bool ? iffy : elsy;
return !!bool ? iffy : (elsy || "");
},
toggle: function (obj, csv1, csv2, str) {
return csv2.split(",")[csv1.match(/\w+/g).indexOf(obj + "")] || str;
Expand Down Expand Up @@ -421,9 +412,6 @@ Mark.pipes = {
last: function (iter) {
return iter.idx === iter.size - 1;
},
pluralize: function (str, n) {
return Mark.plurals[Mark.lang](str.split(";;"), +n).trim();
},
call: function (obj, fn) {
return obj[fn].apply(obj, [].slice.call(arguments, 2));
},
Expand Down
18 changes: 3 additions & 15 deletions reading-list/js/lib/markup.js
@@ -1,5 +1,5 @@
/*
Markup.js v1.5: http://github.com/adammark/Markup.js
Markup.js v1.5.3: http://github.com/adammark/Markup.js
MIT License
(c) 2011 Adam Mark
*/
Expand All @@ -13,16 +13,6 @@ var Mark = {
// argument delimiter
delimiter: ">",

// default language, for i18n
lang: "en",

// plural forms, for i18n
plurals: {
"en": function (msgs, n) {
return msgs[n === 1 ? 0 : 1];
}
},

// return a copy of array A or copy array A into array B (returning B)
_copy: function (a, b) {
b = b || [];
Expand Down Expand Up @@ -192,6 +182,7 @@ Mark.up = function (template, context, options) {

// loop through tags, e.g. {{a}}, {{b}}, {{c}}, {{/c}}
while ((tag = tags[i++])) {
result = undefined;
child = "";
selfy = tag.indexOf("/}}") > -1;
prop = tag.substr(2, tag.length - (selfy ? 5 : 4));
Expand Down Expand Up @@ -377,7 +368,7 @@ Mark.pipes = {
return str.split(separator || ",");
},
choose: function (bool, iffy, elsy) {
return !!bool ? iffy : elsy;
return !!bool ? iffy : (elsy || "");
},
toggle: function (obj, csv1, csv2, str) {
return csv2.split(",")[csv1.match(/\w+/g).indexOf(obj + "")] || str;
Expand Down Expand Up @@ -421,9 +412,6 @@ Mark.pipes = {
last: function (iter) {
return iter.idx === iter.size - 1;
},
pluralize: function (str, n) {
return Mark.plurals[Mark.lang](str.split(";;"), +n).trim();
},
call: function (obj, fn) {
return obj[fn].apply(obj, [].slice.call(arguments, 2));
},
Expand Down

0 comments on commit a67be55

Please sign in to comment.