PluginProbe
Themify Builder / trunk
Themify Builder vtrunk
7.8.1 7.8.0 7.7.9 7.7.8 7.7.7 7.7.6 7.7.5 7.7.4 7.7.3 7.7.2 trunk 7.6.0 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.6.6 7.6.7 7.6.8 7.6.9 7.7.0 7.7.1
themify-builder / themify / js / admin / modules / codemirror / lints / htmlmixed.js

htmlmixed.js in Themify Builder trunk, at themify/js/admin/modules/codemirror/lints/htmlmixed.js

1 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ((t,e)=>{"use strict";e&&!e.verify&&(e=void 0!==e.default?e.default:e.HTMLHint);const r=t=>t.split("\n").length,s=(e,r,s)=>{for(let o=0;o<e.length;++o){let l=e[o];if(l&&l.line>0){let e=l.character-1,o=e+1;if(l.evidence){let t=l.evidence.substring(e).search(/.\b/);t>-1&&(o+=t)}let i=l.line-1+s-1,n={message:l.reason,severity:l.code&&l.code.startsWith("W")?"warning":"error",from:t.Pos(i,e),to:t.Pos(i,o)};r.push(n)}}};t.registerHelper("lint","html",((o,l)=>{l.indent||(l.indent=1);const i=[];return((r,s,o)=>{const l=e.verify(r,s);for(let e=0;e<l.length;e++){let r=l[e],s=r.line-1,i=r.col;o.push({from:t.Pos(r.line-1,r.col-1),to:t.Pos(s,i),message:r.message,severity:r.type})}})(o,l.html.options,i),((e,s,o)=>{const l=e.split(/<style[\s\S]*?>|<\/style>/gi);for(let e=1;e<l.length;e+=2){let i=r(l.slice(0,e).join()),n=CSSLint.verify(l[e],s).messages,f=null;for(let e=0;e<n.length;e++){f=n[e];let r=i-1+f.line-1,s=f.col;o.push({from:t.Pos(i-1+f.line-1,f.col-1),to:t.Pos(r,s),message:f.message,severity:f.type})}}})(o,l.css.options,i),((t,e,o)=>{const l=t.split(/<script[\s\S]*?>|<\/script>/gi);for(let t=1;t<l.length;t+=2)if(l[t].length>1){JSHINT(l[t],e,e.globals);let i=JSHINT.data().errors;i&&s(i,o,r(l.slice(0,t).join()))}})(o,l.javascript.options,i),i}))})(CodeMirror,HTMLHint);