mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
3a9f38a873
commit
59ec87a393
@ -1168,19 +1168,19 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
// Warning: 4
|
||||
// Error: 8
|
||||
ed.getAnnotations = function getAnnotations() {
|
||||
var aceCompatibleMarkers = [];
|
||||
let aceCompatibleMarkers;
|
||||
try {
|
||||
var _model = ed.getModel();
|
||||
const _model = ed.getModel();
|
||||
if (_model !== null) {
|
||||
var id = _model._languageId; // e.g. javascript
|
||||
var ra = _model._associatedResource.authority; //e.g. model
|
||||
var rp = _model._associatedResource.path; //e.g. /18
|
||||
var rs = _model._associatedResource.scheme; //e.g. inmemory
|
||||
var modelMarkers = monaco.editor.getModelMarkers(_model) || [];
|
||||
var thisEditorsMarkers = modelMarkers.filter(function (marker) {
|
||||
var _ra = marker.resource.authority; //e.g. model
|
||||
var _rp = marker.resource.path; //e.g. /18
|
||||
var _rs = marker.resource.scheme; //e.g. inmemory
|
||||
const id = _model.getLanguageId(); // e.g. javascript
|
||||
const ra = _model.uri.authority; // e.g. model
|
||||
const rp = _model.uri.path; // e.g. /18
|
||||
const rs = _model.uri.scheme; // e.g. inmemory
|
||||
const modelMarkers = monaco.editor.getModelMarkers(_model) || [];
|
||||
const thisEditorsMarkers = modelMarkers.filter(function (marker) {
|
||||
const _ra = marker.resource.authority; // e.g. model
|
||||
const _rp = marker.resource.path; // e.g. /18
|
||||
const _rs = marker.resource.scheme; // e.g. inmemory
|
||||
return marker.owner == id && _ra === ra && _rp === rp && _rs === rs;
|
||||
})
|
||||
aceCompatibleMarkers = thisEditorsMarkers.map(function (marker) {
|
||||
|
Loading…
Reference in New Issue
Block a user