File modules/editor/codemirror/addon/lint/yaml-lint.min.js

Last commit: Tue May 22 22:39:52 2018 +0200	Jan Dankert	Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.
1 // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 // Distributed under an MIT license: http://codemirror.net/LICENSE 3 4 (function(mod) { 5 if (typeof exports == "object" && typeof module == "object") // CommonJS 6 mod(require("../../lib/codemirror")); 7 else if (typeof define == "function" && define.amd) // AMD 8 define(["../../lib/codemirror"], mod); 9 else // Plain browser env 10 mod(CodeMirror); 11 })(function(CodeMirror) { 12 "use strict"; 13 14 // Depends on js-yaml.js from https://github.com/nodeca/js-yaml 15 16 // declare global: jsyaml 17 18 CodeMirror.registerHelper("lint", "yaml", function(text) { 19 var found = []; 20 if (!window.jsyaml) { 21 if (window.console) { 22 window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."); 23 } 24 return found; 25 } 26 try { jsyaml.load(text); } 27 catch(e) { 28 var loc = e.mark, 29 // js-yaml YAMLException doesn't always provide an accurate lineno 30 // e.g., when there are multiple yaml docs 31 // --- 32 // --- 33 // foo:bar 34 from = loc ? CodeMirror.Pos(loc.line, loc.column) : CodeMirror.Pos(0, 0), 35 to = from; 36 found.push({ from: from, to: to, message: e.message }); 37 } 38 return found; 39 }); 40 41 });
Download modules/editor/codemirror/addon/lint/yaml-lint.min.js
History Tue, 22 May 2018 22:39:52 +0200 Jan Dankert Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.