mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 12:34:45 -04:00
Updated codemirror to 5.4.0
This commit is contained in:
parent
1d843c8ac2
commit
01685c255f
69 changed files with 2988 additions and 558 deletions
6
public/vendor/codemirror/addon/tern/tern.js
vendored
6
public/vendor/codemirror/addon/tern/tern.js
vendored
|
@ -59,6 +59,7 @@
|
|||
this.options = options || {};
|
||||
var plugins = this.options.plugins || (this.options.plugins = {});
|
||||
if (!plugins.doc_comment) plugins.doc_comment = true;
|
||||
this.docs = Object.create(null);
|
||||
if (this.options.useWorker) {
|
||||
this.server = new WorkerServer(this);
|
||||
} else {
|
||||
|
@ -69,7 +70,6 @@
|
|||
plugins: plugins
|
||||
});
|
||||
}
|
||||
this.docs = Object.create(null);
|
||||
this.trackChange = function(doc, change) { trackChange(self, doc, change); };
|
||||
|
||||
this.cachedArgHints = null;
|
||||
|
@ -124,6 +124,8 @@
|
|||
var self = this;
|
||||
var doc = findDoc(this, cm.getDoc());
|
||||
var request = buildRequest(this, doc, query, pos);
|
||||
var extraOptions = request.query && this.options.queryOptions && this.options.queryOptions[request.query.type]
|
||||
if (extraOptions) for (var prop in extraOptions) request.query[prop] = extraOptions[prop];
|
||||
|
||||
this.server.request(request, function (error, data) {
|
||||
if (!error && self.options.responseFilter)
|
||||
|
@ -442,7 +444,7 @@
|
|||
|
||||
function atInterestingExpression(cm) {
|
||||
var pos = cm.getCursor("end"), tok = cm.getTokenAt(pos);
|
||||
if (tok.start < pos.ch && (tok.type == "comment" || tok.type == "string")) return false;
|
||||
if (tok.start < pos.ch && tok.type == "comment") return false;
|
||||
return /[\w)\]]/.test(cm.getLine(pos.line).slice(Math.max(pos.ch - 1, 0), pos.ch + 1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue