Sha256: 3d83d878f1aa41098172f1a42ac61ca974219fb6ef18cbc2e8a2ee61e4e7f2b0

Contents?: true

Size: 527 Bytes

Versions: 14

Compression:

Stored size: 527 Bytes

Contents

// Depends on jsonlint.js from https://github.com/zaach/jsonlint

CodeMirror.registerHelper("lint", "json", function(text) {
  var found = [];
  jsonlint.parseError = function(str, hash) {
    var loc = hash.loc;
    found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
                to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
                message: str});
  };
  try { jsonlint.parse(text); }
  catch(e) {}
  return found;
});
CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
codemirror-rails-3.17 vendor/assets/javascripts/codemirror/addons/lint/json-lint.js
bonethug-0.0.17 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.16 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.15 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.14 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.13 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.12 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.11 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.10 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
codemirror-rails-3.16 vendor/assets/javascripts/codemirror/addons/lint/json-lint.js
bonethug-0.0.7 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.6 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
bonethug-0.0.5 skel/project_types/silverstripe3/public/abc/lib/codemirror/addon/lint/json-lint.js
codemirror-rails-3.15 vendor/assets/javascripts/codemirror/addons/lint/json-lint.js