snakeskin
Advanced tools
Comparing version 4.0.17 to 4.0.18
{ | ||
"name": "Snakeskin", | ||
"main": "build/snakeskin.min.js", | ||
"version": "4.0.17", | ||
"version": "4.0.18", | ||
"homepage": "https://github.com/kobezzza/Snakeskin", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
/*! | ||
* Snakeskin v4.0.17 (live) | ||
* Snakeskin v4.0.18 (live) | ||
* https://github.com/kobezzza/Snakeskin | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: Sat, 16 Aug 2014 14:40:23 GMT | ||
* Date: Sat, 16 Aug 2014 16:21:29 GMT | ||
*/ | ||
@@ -31,3 +31,3 @@ | ||
*/ | ||
VERSION: [4, 0, 17], | ||
VERSION: [4, 0, 18], | ||
@@ -34,0 +34,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! Snakeskin v4.0.17 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(h){return"[object Array]"==={}.toString.call(h)};String.prototype.trim=String.prototype.trim||function(){for(var h=this.replace(/^\s\s*/,""),k=h.length,l=/\s/;l.test(h.charAt(--k)););return h.substring(0,k+1)};var e={VERSION:[4,0,17],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
/*! Snakeskin v4.0.18 (live) | https://github.com/kobezzza/Snakeskin/blob/master/LICENSE */Array.isArray=Array.isArray||function(h){return"[object Array]"==={}.toString.call(h)};String.prototype.trim=String.prototype.trim||function(){for(var h=this.replace(/^\s\s*/,""),k=h.length,l=/\s/;l.test(h.charAt(--k)););return h.substring(0,k+1)};var e={VERSION:[4,0,18],a:{},Filters:{},Vars:{},LocalVars:{},cache:{}}; | ||
(function(){function h(a){return n[a]}function k(a){return p[a]}var l="undefined"===typeof window&&"undefined"!==typeof exports;e.importFilters=function(a,c){var b=e.Filters;if(c)for(var d=c.split("."),f=-1;++f<d.length;)b[d[f]]||(b[d[f]]={}),b=b[d[f]];for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},q=/[&<>"'\/]/g,r=/([$\w]\s*=\s*)([^"'\s>=]+)/g,s=/(javascript)(:|;)/;e.Filters.html=function(a,c){var b=a+"";c&&(b=b.replace(r, | ||
@@ -3,0 +3,0 @@ '$1"$2"'));b=b.replace(q,k);c&&(b=b.replace(s,"$1$2"));return b};e.Filters.undef=function(a){return void 0!==a?a:""};var n={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"},t=/&|<|>|"|'|//g;e.Filters.uhtml=function(a){return(a+"").replace(t,h)};var u=/<\/?[^>]+>/g;e.Filters.stripTags=function(a){return(a+"").replace(u,"")};var v=/%5B/g,w=/%5D/g;e.Filters.uri=function(a){return encodeURI(a+"").replace(v,"[").replace(w,"]")};e.Filters.upper=function(a){return(a+ |
@@ -5,3 +5,3 @@ var commandRgxp = /([^\s]+).*/; | ||
* Вернуть объект-описание преобразованной части шаблона из | ||
* jade-like синтаксиса в стандартный | ||
* Jade-Like синтаксиса в стандартный | ||
* | ||
@@ -69,3 +69,3 @@ * @param {string} str - исходная строка | ||
var dir = (shortMap[el] || shortMap[next2str]) && nextSpace, | ||
decl = getLineDesc(str, nextSpace && (baseShortMap[el]) || el === IGNORE_COMMAND ? j + 1 : j); | ||
decl = getLineDesc(str, nextSpace && baseShortMap[el] || el === IGNORE_COMMAND ? j + 1 : j, Boolean(dir)); | ||
@@ -217,9 +217,10 @@ if (!decl) { | ||
/** | ||
* Вернуть объект описание строки в jade-like синтаксисе | ||
* Вернуть объект описание строки в Jade-Like синтаксисе | ||
* | ||
* @param {string} str - исходная строка | ||
* @param {number} i - номер начальной итерации | ||
* @param {?boolean=} dir - если true, то идёт декларация директивы | ||
* @return {{command: string, length: number, name: string, lastEl: string}} | ||
*/ | ||
function getLineDesc(str, i) { | ||
function getLineDesc(str, i, dir) { | ||
var res = '', | ||
@@ -244,3 +245,3 @@ name = ''; | ||
lastEl = ''; | ||
if (str.charAt(j - 2) === ' ') { | ||
if (dir && str.charAt(j - 2) === ' ') { | ||
brk = prevEl === CONCAT_END; | ||
@@ -300,3 +301,3 @@ | ||
if (lastEl === CONCAT_END && concatLine && res.charAt(lastElI - 1) === ' ') { | ||
if (dir && lastEl === CONCAT_END && res.charAt(lastElI - 1) === ' ') { | ||
res = res.substring(0, lastElI) + res.substring(lastElI + 1); | ||
@@ -303,0 +304,0 @@ } |
@@ -11,3 +11,3 @@ //#include ./es5shim.live.js | ||
*/ | ||
VERSION: [4, 0, 17], | ||
VERSION: [4, 0, 18], | ||
@@ -14,0 +14,0 @@ /** |
{ | ||
"name": "snakeskin", | ||
"version": "4.0.17", | ||
"version": "4.0.18", | ||
"main": "snakeskin.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1051168
20791