CoreFiles by mySites.guru
xml-hint.min.js1 lines, 2,151 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
a587ee24634fbbef19eeb8ffbbdf9b3f
sha1
25f29e9a2ca4c7dfbd4c6f335052d77a76f01c98
sha256
377cf5ccff2684ae058ba2d830feef4fd467964503e45aabd2d030c2e2e017dd
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var e=t.Pos;t.registerHelper("hint","xml",function(r,s){var n=s&&s.schemaInfo,a=s&&s.quoteChar||'"';if(n){var i=r.getCursor(),o=r.getTokenAt(i);o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start));var l=t.innerMode(r.getMode(),o.state);if("xml"==l.mode.name){var f,g,c=[],h=!1,p=/\btag\b/.test(o.type)&&!/>$/.test(o.string),u=p&&/^\w/.test(o.string);if(u){var d=r.getLine(i.line).slice(Math.max(0,o.start-2),o.start),m=/<\/$/.test(d)?"close":/<$/.test(d)?"open":null;m&&(g=o.start-("close"==m?2:1))}else p&&"<"==o.string?m="open":p&&"</"==o.string&&(m="close");if(!p&&!l.state.tagName||m){u&&(f=o.string),h=m;var v=l.state.context,y=v&&n[v.tagName],x=v?y&&y.children:n["!top"];if(x&&"close"!=m)for(C=0;C<x.length;++C)f&&0!=x[C].lastIndexOf(f,0)||c.push("<"+x[C]);else if("close"!=m)for(var O in n)!n.hasOwnProperty(O)||"!top"==O||"!attrs"==O||f&&0!=O.lastIndexOf(f,0)||c.push("<"+O);v&&(!f||"close"==m&&0==v.tagName.lastIndexOf(f,0))&&c.push("</"+v.tagName+">")}else{var b=(y=n[l.state.tagName])&&y.attrs,w=n["!attrs"];if(!b&&!w)return;if(b){if(w){var I={};for(var P in w)w.hasOwnProperty(P)&&(I[P]=w[P]);for(var P in b)b.hasOwnProperty(P)&&(I[P]=b[P]);b=I}}else b=w;if("string"==o.type||"="==o.string){var A,M=(d=r.getRange(e(i.line,Math.max(0,i.ch-60)),e(i.line,"string"==o.type?o.start:o.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!M||!b.hasOwnProperty(M[1])||!(A=b[M[1]]))return;if("function"==typeof A&&(A=A.call(this,r)),"string"==o.type){f=o.string;var N=0;/['"]/.test(o.string.charAt(0))&&(a=o.string.charAt(0),f=o.string.slice(1),N++);var $=o.string.length;/['"]/.test(o.string.charAt($-1))&&(a=o.string.charAt($-1),f=o.string.substr(N,$-2)),h=!0}for(var C=0;C<A.length;++C)f&&0!=A[C].lastIndexOf(f,0)||c.push(a+A[C]+a)}else{"attribute"==o.type&&(f=o.string,h=!0);for(var j in b)!b.hasOwnProperty(j)||f&&0!=j.lastIndexOf(f,0)||c.push(j)}}return{list:c,from:h?e(i.line,null==g?o.start:g):i,to:h?e(i.line,o.end):i}}}})});

No other release has this exact content. See every version of this file.