Merge pull request #361 from NextStepWebs/development

Fix broken dependency
master 1.11.2
Wes Cossick 8 years ago committed by GitHub
commit 6abda7ab68

@ -1,6 +1,6 @@
{ {
"name": "simplemde", "name": "simplemde",
"version": "1.11.1", "version": "1.11.2",
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor", "homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"authors": [ "authors": [
"Wes Cossick <https://wescossick.com>" "Wes Cossick <https://wescossick.com>"

@ -1,5 +1,5 @@
/** /**
* simplemde v1.11.1 * simplemde v1.11.2
* Copyright Next Step Webs, Inc. * Copyright Next Step Webs, Inc.
* @link https://github.com/NextStepWebs/simplemde-markdown-editor * @link https://github.com/NextStepWebs/simplemde-markdown-editor
* @license MIT * @license MIT

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/** /**
* simplemde v1.11.1 * simplemde v1.11.2
* Copyright Next Step Webs, Inc. * Copyright Next Step Webs, Inc.
* @link https://github.com/NextStepWebs/simplemde-markdown-editor * @link https://github.com/NextStepWebs/simplemde-markdown-editor
* @license MIT * @license MIT
@ -1833,107 +1833,125 @@ function isnan (val) {
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"base64-js":1,"ieee754":15,"isarray":16}],4:[function(require,module,exports){ },{"base64-js":1,"ieee754":15,"isarray":16}],4:[function(require,module,exports){
/* globals CodeMirror */ // Use strict mode (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)
// Use strict mode (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) "use strict";
"use strict";
// Requires
// Requires var Typo = require("typo-js");
var Typo = require("typo-js");
// Create function
// Initialize data globally to reduce memory consumption function CodeMirrorSpellChecker(options) {
var num_loaded = 0; // Initialize
var aff_loading = false; options = options || {};
var dic_loading = false;
var aff_data = "";
var dic_data = ""; // Verify
var typo; if(typeof options.codeMirrorInstance !== "function" || typeof options.codeMirrorInstance.defineMode !== "function") {
console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");
return;
CodeMirror.defineMode("spell-checker", function(config) { }
// Load AFF/DIC data
if(!aff_loading) {
aff_loading = true; // Because some browsers don't support this functionality yet
var xhr_aff = new XMLHttpRequest(); if(!String.prototype.includes) {
xhr_aff.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff", true); String.prototype.includes = function() {
xhr_aff.onload = function() { "use strict";
if(xhr_aff.readyState === 4 && xhr_aff.status === 200) { return String.prototype.indexOf.apply(this, arguments) !== -1;
aff_data = xhr_aff.responseText; };
num_loaded++; }
if(num_loaded == 2) {
typo = new Typo("en_US", aff_data, dic_data, { // Define the new mode
platform: "any" options.codeMirrorInstance.defineMode("spell-checker", function(config) {
}); // Load AFF/DIC data
} if(!CodeMirrorSpellChecker.aff_loading) {
} CodeMirrorSpellChecker.aff_loading = true;
}; var xhr_aff = new XMLHttpRequest();
xhr_aff.send(null); xhr_aff.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff", true);
} xhr_aff.onload = function() {
if(xhr_aff.readyState === 4 && xhr_aff.status === 200) {
if(!dic_loading) { CodeMirrorSpellChecker.aff_data = xhr_aff.responseText;
dic_loading = true; CodeMirrorSpellChecker.num_loaded++;
var xhr_dic = new XMLHttpRequest();
xhr_dic.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic", true); if(CodeMirrorSpellChecker.num_loaded == 2) {
xhr_dic.onload = function() { CodeMirrorSpellChecker.typo = new Typo("en_US", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {
if(xhr_dic.readyState === 4 && xhr_dic.status === 200) { platform: "any"
dic_data = xhr_dic.responseText; });
num_loaded++; }
}
if(num_loaded == 2) { };
typo = new Typo("en_US", aff_data, dic_data, { xhr_aff.send(null);
platform: "any" }
});
} if(!CodeMirrorSpellChecker.dic_loading) {
} CodeMirrorSpellChecker.dic_loading = true;
}; var xhr_dic = new XMLHttpRequest();
xhr_dic.send(null); xhr_dic.open("GET", "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic", true);
} xhr_dic.onload = function() {
if(xhr_dic.readyState === 4 && xhr_dic.status === 200) {
CodeMirrorSpellChecker.dic_data = xhr_dic.responseText;
// Define what separates a word CodeMirrorSpellChecker.num_loaded++;
var rx_word = "!\"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ";
if(CodeMirrorSpellChecker.num_loaded == 2) {
CodeMirrorSpellChecker.typo = new Typo("en_US", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {
// Create the overlay and such platform: "any"
var overlay = { });
token: function(stream) { }
var ch = stream.peek(); }
var word = ""; };
xhr_dic.send(null);
if(rx_word.includes(ch)) { }
stream.next();
return null;
} // Define what separates a word
var rx_word = "!\"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ";
while((ch = stream.peek()) != null && !rx_word.includes(ch)) {
word += ch;
stream.next(); // Create the overlay and such
} var overlay = {
token: function(stream) {
if(typo && !typo.check(word)) var ch = stream.peek();
return "spell-error"; // CSS class: cm-spell-error var word = "";
return null; if(rx_word.includes(ch)) {
} stream.next();
}; return null;
}
var mode = CodeMirror.getMode(
config, config.backdrop || "text/plain" while((ch = stream.peek()) != null && !rx_word.includes(ch)) {
); word += ch;
stream.next();
return CodeMirror.overlayMode(mode, overlay, true); }
});
if(CodeMirrorSpellChecker.typo && !CodeMirrorSpellChecker.typo.check(word))
return "spell-error"; // CSS class: cm-spell-error
// Because some browsers don't support this functionality yet
if(!String.prototype.includes) { return null;
String.prototype.includes = function() { }
"use strict"; };
return String.prototype.indexOf.apply(this, arguments) !== -1;
}; var mode = options.codeMirrorInstance.getMode(
config, config.backdrop || "text/plain"
);
return options.codeMirrorInstance.overlayMode(mode, overlay, true);
});
} }
// Initialize data globally to reduce memory consumption
CodeMirrorSpellChecker.num_loaded = 0;
CodeMirrorSpellChecker.aff_loading = false;
CodeMirrorSpellChecker.dic_loading = false;
CodeMirrorSpellChecker.aff_data = "";
CodeMirrorSpellChecker.dic_data = "";
CodeMirrorSpellChecker.typo;
// Export
module.exports = CodeMirrorSpellChecker;
},{"typo-js":18}],5:[function(require,module,exports){ },{"typo-js":18}],5:[function(require,module,exports){
// CodeMirror, copyright (c) by Marijn Haverbeke and others // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE // Distributed under an MIT license: http://codemirror.net/LICENSE

@ -1,5 +1,5 @@
/** /**
* simplemde v1.11.1 * simplemde v1.11.2
* Copyright Next Step Webs, Inc. * Copyright Next Step Webs, Inc.
* @link https://github.com/NextStepWebs/simplemde-markdown-editor * @link https://github.com/NextStepWebs/simplemde-markdown-editor
* @license MIT * @license MIT

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{ {
"name": "simplemde", "name": "simplemde",
"version": "1.11.1", "version": "1.11.2",
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor. Features autosaving and spell checking.", "description": "A simple, beautiful, and embeddable JavaScript Markdown editor. Features autosaving and spell checking.",
"keywords": [ "keywords": [
"embeddable", "embeddable",

Loading…
Cancel
Save