File manager - Edit - /home/opticamezl/www/newok/haml.tar
Back
haml.min.js.gz 0000644 00000001540 15175243620 0007231 0 ustar 00 � }UMo�8�ﯰ� [�j�2Xc��a� ���,��%�K�Zg���D��b'[��{3���&Em C���l����:��"v��H(,���&���k�)#)�B��fPj�#\��OX�>A6=��p����!��i�6�(�P��dRf;���.o�%݃@#��fp���-g�ܐ��U�N�H�(=�̀���,��)o~&n��G��%�IJ����rQ,<�{;�����ά8��y80�|�R�R-;�o� H�0�?��G|R�z�@8!�B��I[��N�k�������6(��4Y&�>1��"|nj��xk���qAR[�`���D��I�Ps������9yt�Sۺ�� d��}�Д��&��}y�<xP{I�_� �\&�λ��i�ȚP�\� ��e�~|���_�ˇO* ��/�jї����¥�[�)"�DZ��e<//o�r��W����Piw��6]D#�Ňr9� ��<6_�X_�j�ؐ�y�^��x�F�o�w^���b )� #d�_��]i�,���}�A~�XF�s�vpt�����8������0|�r�2�,O�qf466"�fb��X$+n�lŦ.��S+� �mEj�ϯ��Q6�D�f�L�ܩf6A&���_�5�O=�4!��}&U�`de֕�4f�H��|�Eի�g.������CuQl���X��k�)�k��Q��E0j�z�ä��ux��zS5o��'��]�_$a�q7XJ�Z�i�=JSϺo�U? c���;�8�b}�a�9 o��Y��C�K�m[A��oL��7_A8at���w3o�����M� haml.js 0000644 00000012355 15175243620 0006036 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/5/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; // full haml mode. This handled embedded ruby and html fragments too CodeMirror.defineMode("haml", function(config) { var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); var rubyMode = CodeMirror.getMode(config, "ruby"); function rubyInQuote(endQuote) { return function(stream, state) { var ch = stream.peek(); if (ch == endQuote && state.rubyState.tokenize.length == 1) { // step out of ruby context as it seems to complete processing all the braces stream.next(); state.tokenize = html; return "closeAttributeTag"; } else { return ruby(stream, state); } }; } function ruby(stream, state) { if (stream.match("-#")) { stream.skipToEnd(); return "comment"; } return rubyMode.token(stream, state.rubyState); } function html(stream, state) { var ch = stream.peek(); // handle haml declarations. All declarations that cant be handled here // will be passed to html mode if (state.previousToken.style == "comment" ) { if (state.indented > state.previousToken.indented) { stream.skipToEnd(); return "commentLine"; } } if (state.startOfLine) { if (ch == "!" && stream.match("!!")) { stream.skipToEnd(); return "tag"; } else if (stream.match(/^%[\w:#\.]+=/)) { state.tokenize = ruby; return "hamlTag"; } else if (stream.match(/^%[\w:]+/)) { return "hamlTag"; } else if (ch == "/" ) { stream.skipToEnd(); return "comment"; } } if (state.startOfLine || state.previousToken.style == "hamlTag") { if ( ch == "#" || ch == ".") { stream.match(/[\w-#\.]*/); return "hamlAttribute"; } } // do not handle --> as valid ruby, make it HTML close comment instead if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) { state.tokenize = ruby; return state.tokenize(stream, state); } if (state.previousToken.style == "hamlTag" || state.previousToken.style == "closeAttributeTag" || state.previousToken.style == "hamlAttribute") { if (ch == "(") { state.tokenize = rubyInQuote(")"); return state.tokenize(stream, state); } else if (ch == "{") { if (!stream.match(/^\{%.*/)) { state.tokenize = rubyInQuote("}"); return state.tokenize(stream, state); } } } return htmlMode.token(stream, state.htmlState); } return { // default to html mode startState: function() { var htmlState = CodeMirror.startState(htmlMode); var rubyState = CodeMirror.startState(rubyMode); return { htmlState: htmlState, rubyState: rubyState, indented: 0, previousToken: { style: null, indented: 0}, tokenize: html }; }, copyState: function(state) { return { htmlState : CodeMirror.copyState(htmlMode, state.htmlState), rubyState: CodeMirror.copyState(rubyMode, state.rubyState), indented: state.indented, previousToken: state.previousToken, tokenize: state.tokenize }; }, token: function(stream, state) { if (stream.sol()) { state.indented = stream.indentation(); state.startOfLine = true; } if (stream.eatSpace()) return null; var style = state.tokenize(stream, state); state.startOfLine = false; // dont record comment line as we only want to measure comment line with // the opening comment block if (style && style != "commentLine") { state.previousToken = { style: style, indented: state.indented }; } // if current state is ruby and the previous token is not `,` reset the // tokenize to html if (stream.eol() && state.tokenize == ruby) { stream.backUp(1); var ch = stream.peek(); stream.next(); if (ch && ch != ",") { state.tokenize = html; } } // reprocess some of the specific style tag when finish setting previousToken if (style == "hamlTag") { style = "tag"; } else if (style == "commentLine") { style = "comment"; } else if (style == "hamlAttribute") { style = "attribute"; } else if (style == "closeAttributeTag") { style = null; } return style; } }; }, "htmlmixed", "ruby"); CodeMirror.defineMIME("text/x-haml", "haml"); }); haml.min.js 0000644 00000004352 15175243620 0006616 0 ustar 00 (function(t){typeof exports=="object"&&typeof module=="object"?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haml",function(c){var r=t.getMode(c,{name:"htmlmixed"}),l=t.getMode(c,"ruby");function k(n){return function(e,i){var o=e.peek();return o==n&&i.rubyState.tokenize.length==1?(e.next(),i.tokenize=f,"closeAttributeTag"):u(e,i)}}function u(n,e){return n.match("-#")?(n.skipToEnd(),"comment"):l.token(n,e.rubyState)}function f(n,e){var i=n.peek();if(e.previousToken.style=="comment"&&e.indented>e.previousToken.indented)return n.skipToEnd(),"commentLine";if(e.startOfLine){if(i=="!"&&n.match("!!"))return n.skipToEnd(),"tag";if(n.match(/^%[\w:#\.]+=/))return e.tokenize=u,"hamlTag";if(n.match(/^%[\w:]+/))return"hamlTag";if(i=="/")return n.skipToEnd(),"comment"}if((e.startOfLine||e.previousToken.style=="hamlTag")&&(i=="#"||i=="."))return n.match(/[\w-#\.]*/),"hamlAttribute";if(e.startOfLine&&!n.match("-->",!1)&&(i=="="||i=="-"))return e.tokenize=u,e.tokenize(n,e);if(e.previousToken.style=="hamlTag"||e.previousToken.style=="closeAttributeTag"||e.previousToken.style=="hamlAttribute"){if(i=="(")return e.tokenize=k(")"),e.tokenize(n,e);if(i=="{"&&!n.match(/^\{%.*/))return e.tokenize=k("}"),e.tokenize(n,e)}return r.token(n,e.htmlState)}return{startState:function(){var n=t.startState(r),e=t.startState(l);return{htmlState:n,rubyState:e,indented:0,previousToken:{style:null,indented:0},tokenize:f}},copyState:function(n){return{htmlState:t.copyState(r,n.htmlState),rubyState:t.copyState(l,n.rubyState),indented:n.indented,previousToken:n.previousToken,tokenize:n.tokenize}},token:function(n,e){if(n.sol()&&(e.indented=n.indentation(),e.startOfLine=!0),n.eatSpace())return null;var i=e.tokenize(n,e);if(e.startOfLine=!1,i&&i!="commentLine"&&(e.previousToken={style:i,indented:e.indented}),n.eol()&&e.tokenize==u){n.backUp(1);var o=n.peek();n.next(),o&&o!=","&&(e.tokenize=f)}return i=="hamlTag"?i="tag":i=="commentLine"?i="comment":i=="hamlAttribute"?i="attribute":i=="closeAttributeTag"&&(i=null),i}}},"htmlmixed","ruby"),t.defineMIME("text/x-haml","haml")});
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings