All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webapp.flint.sparql.lib.runmode.js Maven / Gradle / Ivy

Go to download

Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1 Query and Update.

The newest version!
CodeMirror.runMode = function(string, modespec, callback) {
  var mode = CodeMirror.getMode({indentUnit: 2}, modespec);
  var isNode = callback.nodeType == 1;
  if (isNode) {
    var node = callback, accum = [];
    callback = function(string, style) {
      if (string == "\n")
        accum.push("
"); else if (style) accum.push("" + CodeMirror.htmlEscape(string) + ""); else accum.push(CodeMirror.htmlEscape(string)); } } var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); for (var i = 0, e = lines.length; i < e; ++i) { if (i) callback("\n"); var stream = new CodeMirror.StringStream(lines[i]); while (!stream.eol()) { var style = mode.token(stream, state); callback(stream.current(), style); stream.start = stream.pos; } } if (isNode) node.innerHTML = accum.join(""); };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy