vendor/assets/javascripts/codemirror/addons/hint/xml-hint.js in codemirror-rails-3.14 vs vendor/assets/javascripts/codemirror/addons/hint/xml-hint.js in codemirror-rails-3.15
- old
+ new
@@ -1,11 +1,11 @@
(function() {
"use strict";
var Pos = CodeMirror.Pos;
- CodeMirror.xmlHint = function(cm, options) {
+ function getHints(cm, options) {
var tags = options && options.schemaInfo;
var quote = (options && options.quoteChar) || '"';
if (!tags) return;
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
var inner = CodeMirror.innerMode(cm.getMode(), token.state);
@@ -59,7 +59,10 @@
return {
list: result,
from: replaceToken ? Pos(cur.line, token.start) : cur,
to: replaceToken ? Pos(cur.line, token.end) : cur
};
- };
+ }
+
+ CodeMirror.xmlHint = getHints; // deprecated
+ CodeMirror.registerHelper("hint", "xml", getHints);
})();