Returns completions for markup languages (HTML, Slim, Pug, etc.)
@param  {TextEditor} editor
@param  {String} prefix
@return {Array}
491236
function getMarkupSnippetsCompletions(editor, prefix) {
	const syntax = detectSyntax(editor);

	if (!completionsCache.has(syntax)) {
		// Create cache with Emmet snippets completions
		const registry = createSnippetsRegistry(syntax);
		const field = (index, placeholder) => placeholder || '';
		const completions = registry.all({type: 'string'}).map(snippet => ({
			text: snippet.key,
			type: 'snippet',
			rightLabel: expandAbbreviation(snippet.value, editor, { syntax, field })
		}));

		completionsCache.set(syntax, completions);
	}

	let completions = completionsCache.get(syntax);

	if (prefix) {
		completions = completions.filter(completion => completion.text.indexOf(prefix) === 0);
	}

	return completions.map(completion => Object.assign({ replacementPrefix: prefix }, completion));
}
163873
function(prefix) {
    jst.global          = true;
    jst.globalTagPrefix = prefix || jst.tagPrefix;
    for (let tag of jst.tags) {
      let name = jst.globalTagPrefix + tag;
      let g = typeof global !== 'undefined' ? global : window;
      g[name] = function() {
        return jst[name].apply(this, arguments);
      };
    }
  }
531701
def complete_get(self, text, line, begidx, endidx):
        """"""

        options = self.GET_OPTS

        if not text:
            completions = options
        else:
            completions = [f
                           for f in options
                           if f.startswith(text)
                           ]
        return completions
274550
function( editor ) {
		var pluginName = 'specialchar',
			plugin = this;

		// Register the dialog.
		CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );

		editor.addCommand( pluginName, {
			exec: function() {
				var langCode = editor.langCode;
				langCode =
					plugin.availableLangs[ langCode ] ? langCode :
					plugin.availableLangs[ langCode.replace( /-.*/, '' ) ] ? langCode.replace( /-.*/, '' ) :
					'en';

				CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'dialogs/lang/' + langCode + '.js' ), function() {
					CKEDITOR.tools.extend( editor.lang.specialchar, plugin.langEntries[ langCode ] );
					editor.openDialog( pluginName );
				} );
			},
			modes: { wysiwyg: 1 },
			canUndo: false
		} );

		// Register the toolbar button.
		editor.ui.addButton && editor.ui.addButton( 'SpecialChar', {
			label: editor.lang.specialchar.toolbar,
			command: pluginName,
			toolbar: 'insert,50'
		} );
	}
102260
function _getExclusionList(editor, constPos) {
        var ctxPrev, ctxNext, exclusionList = [], pos, braceParity;

        // Move back to find exclusions.
        pos = $.extend({}, constPos);
        braceParity = 1;
        ctxPrev = TokenUtils.getInitialContext(editor._codeMirror, pos);
        while (TokenUtils.moveSkippingWhitespace(TokenUtils.movePrevToken, ctxPrev)) {
            if (ctxPrev.token.type === null) {
                if (ctxPrev.token.string === "}") {
                    braceParity++;
                } else if (ctxPrev.token.string === "{") {
                    braceParity--;
                }
            }

            if (braceParity === 1 && ctxPrev.token.type === "string property") {
                exclusionList.push(stripQuotes(ctxPrev.token.string));
            } else if (braceParity === 0) {
                break;
            }
        }

        // Move forward and find exclusions.
        pos = $.extend({}, constPos);
        braceParity = 1;
        ctxNext = TokenUtils.getInitialContext(editor._codeMirror, pos);
        while (TokenUtils.moveSkippingWhitespace(TokenUtils.moveNextToken, ctxNext)) {
            if (ctxNext.token.type === null) {
                if (ctxNext.token.string === "{") {
                    braceParity++;
                } else if (ctxNext.token.string === "}") {
                    braceParity--;
                }
            }

            if (braceParity === 1 && ctxNext.token.type === "string property") {
                exclusionList.push(stripQuotes(ctxNext.token.string));
            } else if (braceParity === 0) {
                break;
            }
        }

        return exclusionList;
    }
1335432
function findNestedEditables( container ) {
		var editables = [];

		container.forEach( function( element ) {
			if ( element.getAttribute( 'contenteditable' ) == 'true' ) {
				editables.push( element );
				return false; // Skip children.
			}
		}, CKEDITOR.NODE_ELEMENT, true );

		return editables;
	}
1340653
public Iterable<? extends Completion> getCompletions(Element element,
                                                         AnnotationMirror annotation,
                                                         ExecutableElement member,
                                                         String userText) {
        return Collections.emptyList();
    }
37198
function (elements, id) {
      return function (editor) {
        var i, textBlockElementsMap = editor.schema.getTextBlockElements();

        for (i = 0; i < elements.length; i++) {
          if (elements[i].nodeName === 'TABLE') {
            return null;
          }
        }

        for (i = 0; i < elements.length; i++) {
          if (elements[i].nodeName in textBlockElementsMap) {
            if (editor.dom.isEmpty(elements[i])) {
              return Matcher.result(id, Measure.getSelectionRect(editor));
            }

            return null;
          }
        }

        return null;
      };
    }
198057
function pickPrefix(prefix, object) {
    var length = prefix.length;
    var sub;
    return foldl(
      function(acc, val, key) {
        if (key.substr(0, length) === prefix) {
          sub = key.substr(length);
          acc[sub] = val;
        }
        return acc;
      },
      {},
      object
    );
  }
770783
function getStylesheetSnippetsCompletions(editor, prefix) {
	if (hasScope(editor, 'meta.property-value')) {
		return false;
	}

	const syntax = detectSyntax(editor);

	if (!completionsCache.has(syntax)) {
		// Create cache with Emmet snippets completions
		const registry = createSnippetsRegistry(syntax);
		const snippets = convertToCSSSnippets(registry);
		const completions = snippets.map(snippet => {
			let rightLabel = snippet.property;
			let description;
			const keywords = snippet.keywords();
			if (keywords.length) {
				rightLabel += ` <span class="emmet-snippet-keywords">${removeFields(keywords.join(' | '))}</span>`;
				description = 'Contains embedded keywords. Type `-` or `:` and first embedded keyword letters for completion.';
			}

			return {
				text: snippet.key,
				type: 'snippet',
				rightLabelHTML: rightLabel,
				description
			};
		});

		completionsCache.set(syntax, completions);
	}

	let completions = completionsCache.get(syntax);

	if (prefix) {
		completions = completions.filter(completion => completion.text.indexOf(prefix) === 0);
	}

	return completions.map(completion => Object.assign({ replacementPrefix: prefix }, completion));
}
337817
function _markTextFromDOM(editor, dom) {
        var cm = editor._codeMirror;

        // Remove existing marks
        var marks = cm.getAllMarks();
        cm.operation(function () {
            marks.forEach(function (mark) {
                if (mark.hasOwnProperty("tagID")) {
                    mark.clear();
                }
            });
        });

        // Mark
        _markTags(cm, dom);
    }
184827
function findAbbreviation(editor) {
		var r = range(editor.getSelectionRange());
		var content = String(editor.getContent());
		if (r.length()) {
			// abbreviation is selected by user
			return r.substring(content);
		}
		
		// search for new abbreviation from current caret position
		var curLine = editor.getCurrentLineRange();
		return actionUtils.extractAbbreviation(content.substring(curLine.start, r.start));
	}
1343293
function( editor ) {
			editor._.elementsPath = {
				idBase: 'cke_elementspath_' + CKEDITOR.tools.getNextNumber() + '_',
				filters: []
			};

			editor.on( 'uiSpace', function( event ) {
				if ( event.data.space == 'bottom' )
					initElementsPath( editor, event.data );
			} );
		}
1353856
private CompletionProvider snippetCompletion(Supplier<Stream<? extends Snippet>> snippetsSupplier) {
        return (prefix, cursor, anchor) -> {
            anchor[0] = 0;
            int space = prefix.lastIndexOf(' ');
            Set<String> prior = new HashSet<>(Arrays.asList(prefix.split(" ")));
            if (prior.contains("-all") || prior.contains("-history")) {
                return Collections.emptyList();
            }
            String argPrefix = prefix.substring(space + 1);
            return snippetsSupplier.get()
                        .filter(k -> !prior.contains(String.valueOf(k.id()))
                                && (!(k instanceof DeclarationSnippet)
                                     || !prior.contains(((DeclarationSnippet) k).name())))
                        .flatMap(k -> (k instanceof DeclarationSnippet)
                                ? Stream.of(String.valueOf(k.id()) + " ", ((DeclarationSnippet) k).name() + " ")
                                : Stream.of(String.valueOf(k.id()) + " "))
                        .filter(k -> k.startsWith(argPrefix))
                        .map(ArgSuggestion::new)
                        .collect(Collectors.toList());
        };
    }
1324613
function(editorContext, context, astManager) {
	            return astManager.getAST(editorContext).then(function(ast) {
	                var node = Finder.findNode(context.annotation.start, ast, {parents:true});
	                if(node && node.type === 'ArrayExpression') {
	                    var model = new TextModel.TextModel(ast.sourceFile.text.slice(context.annotation.start, context.annotation.end));
	                    var len = node.elements.length;
	                    var idx = len-1;
	                    var item = node.elements[idx];
	                    if(item === null) {
	                        var end = Finder.findToken(node.range[1], ast.tokens);
	                        if(end.value !== ']') {
	                            //for a follow-on token we want the previous - i.e. a token immediately following the ']' that has no space
	                            end = ast.tokens[end.index-1];
	                        }
	                        //wipe all trailing entries first using the ']' token start as the end
	                        for(; idx > -1; idx--) {
	                            item = node.elements[idx];
	                            if(item !== null) {
	                                break;
	                            }
	                        }
	                        if(item === null) {
	                            //whole array is sparse - wipe it
	                            return editorContext.setText('', context.annotation.start+1, context.annotation.end-1);
	                        }
	                        model.setText('', item.range[1]-context.annotation.start, end.range[0]-context.annotation.start);
	                    }
	                    var prev = item;
	                    for(; idx > -1; idx--) {
	                        item = node.elements[idx];
	                        if(item === null || item.range[0] === prev.range[0]) {
	                            continue;
	                        }
	                        model.setText(', ', item.range[1]-context.annotation.start, prev.range[0]-context.annotation.start); //$NON-NLS-1$
	                        prev = item;
	                    }
	                    if(item === null && prev !== null) {
	                        //need to wipe the front of the array
	                        model.setText('', node.range[0]+1-context.annotation.start, prev.range[0]-context.annotation.start);
	                    }
	                    return editorContext.setText(model.getText(), context.annotation.start, context.annotation.end);
	                }
	                return null;
	            });
	        }
41511
function prefixAll(styles) {
  Object.keys(styles).forEach(function (property) {
    var value = styles[property];
    if (value instanceof Object && !Array.isArray(value)) {
      // recurse through nested style objects
      styles[property] = prefixAll(value);
    } else {
      Object.keys(_prefixProps2.default).forEach(function (prefix) {
        var properties = _prefixProps2.default[prefix];
        // add prefixes if needed
        if (properties[property]) {
          styles[prefix + (0, _capitalizeString2.default)(property)] = value;
        }
      });
    }
  });

  Object.keys(styles).forEach(function (property) {
    [].concat(styles[property]).forEach(function (value, index) {
      // resolve every special plugins
      plugins.forEach(function (plugin) {
        return assignStyles(styles, plugin(property, value));
      });
    });
  });

  return (0, _sortPrefixedStyle2.default)(styles);
}
1076749
function editors () {
  editors.textBox = form.textBox = ace.edit("text-box");
  form.textBox.setTheme(ACE_THEME);
  var session = form.textBox.getSession();
  session.setMode("ace/mode/yaml");
  session.setTabSize(2);

  editors.results = $("#results");
  editors.tabs = editors.results.find(".nav-tabs");
  editors.panes = editors.results.find(".tab-content");
}