|
7 | 7 | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SimpleMDE = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
8 | 8 | (function (global){
|
9 | 9 |
|
10 |
| -; Typo = global.Typo = require("/Users/laci/Documents/Sites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js"); |
| 10 | +; Typo = global.Typo = require("/Users/wescossick/Documents/Websites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js"); |
11 | 11 | CodeMirror = global.CodeMirror = require("codemirror");
|
12 | 12 | ; var __browserify_shim_require__=require;(function browserifyShim(module, define, require) {
|
13 | 13 | // Initialize data globally to reduce memory consumption
|
@@ -105,7 +105,7 @@ if(!String.prototype.includes) {
|
105 | 105 | }).call(global, module, undefined, undefined);
|
106 | 106 |
|
107 | 107 | }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
108 |
| -},{"/Users/laci/Documents/Sites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js":2,"codemirror":7}],2:[function(require,module,exports){ |
| 108 | +},{"/Users/wescossick/Documents/Websites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js":2,"codemirror":7}],2:[function(require,module,exports){ |
109 | 109 | (function (global){
|
110 | 110 | ; var __browserify_shim_require__=require;(function browserifyShim(module, exports, require, define, browserify_shim__define__module__export__) {
|
111 | 111 | 'use strict';
|
@@ -1670,6 +1670,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
1670 | 1670 |
|
1671 | 1671 | d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
|
1672 | 1672 | d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
|
| 1673 | + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent" |
1673 | 1674 |
|
1674 | 1675 | if (sizes.right && sizes.bottom) {
|
1675 | 1676 | d.scrollbarFiller.style.display = "block";
|
@@ -1914,9 +1915,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
1914 | 1915 |
|
1915 | 1916 | function setDocumentHeight(cm, measure) {
|
1916 | 1917 | cm.display.sizer.style.minHeight = measure.docHeight + "px";
|
1917 |
| - var total = measure.docHeight + cm.display.barHeight; |
1918 |
| - cm.display.heightForcer.style.top = total + "px"; |
1919 |
| - cm.display.gutters.style.height = Math.max(total + scrollGap(cm), measure.clientHeight) + "px"; |
| 1918 | + cm.display.heightForcer.style.top = measure.docHeight + "px"; |
| 1919 | + cm.display.gutters.style.height = Math.max(measure.docHeight + cm.display.barHeight + scrollGap(cm), |
| 1920 | + measure.clientHeight) + "px"; |
1920 | 1921 | }
|
1921 | 1922 |
|
1922 | 1923 | // Read the actual heights of the rendered lines, and update their
|
@@ -2609,10 +2610,11 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
2609 | 2610 | if (reset && cm.doc.sel.contains(pos) == -1)
|
2610 | 2611 | operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
|
2611 | 2612 |
|
2612 |
| - var oldCSS = te.style.cssText; |
2613 |
| - input.wrapper.style.position = "absolute"; |
2614 |
| - te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + |
2615 |
| - "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " + |
| 2613 | + var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText; |
| 2614 | + input.wrapper.style.cssText = "position: absolute" |
| 2615 | + var wrapperBox = input.wrapper.getBoundingClientRect() |
| 2616 | + te.style.cssText = "position: absolute; width: 30px; height: 30px; top: " + (e.clientY - wrapperBox.top - 5) + |
| 2617 | + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px; z-index: 1000; background: " + |
2616 | 2618 | (ie ? "rgba(255, 255, 255, .05)" : "transparent") +
|
2617 | 2619 | "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
|
2618 | 2620 | if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)
|
@@ -2643,7 +2645,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
2643 | 2645 | }
|
2644 | 2646 | function rehide() {
|
2645 | 2647 | input.contextMenuPending = false;
|
2646 |
| - input.wrapper.style.position = "relative"; |
| 2648 | + input.wrapper.style.cssText = oldWrapperCSS |
2647 | 2649 | te.style.cssText = oldCSS;
|
2648 | 2650 | if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
|
2649 | 2651 |
|
@@ -8747,9 +8749,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
8747 | 8749 | var spans = line.markedSpans;
|
8748 | 8750 | if (spans) for (var i = 0; i < spans.length; i++) {
|
8749 | 8751 | var span = spans[i];
|
8750 |
| - if (!(lineNo == from.line && from.ch > span.to || |
8751 |
| - span.from == null && lineNo != from.line|| |
8752 |
| - lineNo == to.line && span.from > to.ch) && |
| 8752 | + if (!(span.to != null && lineNo == from.line && from.ch > span.to || |
| 8753 | + span.from == null && lineNo != from.line || |
| 8754 | + span.from != null && lineNo == to.line && span.from > to.ch) && |
8753 | 8755 | (!filter || filter(span.marker)))
|
8754 | 8756 | found.push(span.marker.parent || span.marker);
|
8755 | 8757 | }
|
@@ -10011,7 +10013,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
10011 | 10013 |
|
10012 | 10014 | // THE END
|
10013 | 10015 |
|
10014 |
| - CodeMirror.version = "5.11.1"; |
| 10016 | + CodeMirror.version = "5.12.1"; |
10015 | 10017 |
|
10016 | 10018 | return CodeMirror;
|
10017 | 10019 | });
|
@@ -10164,8 +10166,8 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
|
10164 | 10166 |
|
10165 | 10167 | CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
10166 | 10168 |
|
10167 |
| - var htmlFound = CodeMirror.modes.hasOwnProperty("xml"); |
10168 |
| - var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain"); |
| 10169 | + var htmlMode = CodeMirror.getMode(cmCfg, "text/html"); |
| 10170 | + var htmlModeMissing = htmlMode.name == "null" |
10169 | 10171 |
|
10170 | 10172 | function getMode(name) {
|
10171 | 10173 | if (CodeMirror.findModeByName) {
|
@@ -10270,7 +10272,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
10270 | 10272 | state.quote = 0;
|
10271 | 10273 | // Reset state.indentedCode
|
10272 | 10274 | state.indentedCode = false;
|
10273 |
| - if (!htmlFound && state.f == htmlBlock) { |
| 10275 | + if (htmlModeMissing && state.f == htmlBlock) { |
10274 | 10276 | state.f = inlineNormal;
|
10275 | 10277 | state.block = blockNormal;
|
10276 | 10278 | }
|
@@ -10373,12 +10375,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
10373 | 10375 |
|
10374 | 10376 | function htmlBlock(stream, state) {
|
10375 | 10377 | var style = htmlMode.token(stream, state.htmlState);
|
10376 |
| - if ((htmlFound && state.htmlState.tagStart === null && |
10377 |
| - (!state.htmlState.context && state.htmlState.tokenize.isInText)) || |
10378 |
| - (state.md_inside && stream.current().indexOf(">") > -1)) { |
10379 |
| - state.f = inlineNormal; |
10380 |
| - state.block = blockNormal; |
10381 |
| - state.htmlState = null; |
| 10378 | + if (!htmlModeMissing) { |
| 10379 | + var inner = CodeMirror.innerMode(htmlMode, state.htmlState) |
| 10380 | + if ((inner.mode.name == "xml" && inner.state.tagStart === null && |
| 10381 | + (!inner.state.context && inner.state.tokenize.isInText)) || |
| 10382 | + (state.md_inside && stream.current().indexOf(">") > -1)) { |
| 10383 | + state.f = inlineNormal; |
| 10384 | + state.block = blockNormal; |
| 10385 | + state.htmlState = null; |
| 10386 | + } |
10382 | 10387 | }
|
10383 | 10388 | return style;
|
10384 | 10389 | }
|
@@ -10527,15 +10532,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
10527 | 10532 |
|
10528 | 10533 | var ch = stream.next();
|
10529 | 10534 |
|
10530 |
| - if (ch === '\\') { |
10531 |
| - stream.next(); |
10532 |
| - if (modeCfg.highlightFormatting) { |
10533 |
| - var type = getType(state); |
10534 |
| - var formattingEscape = tokenTypes.formatting + "-escape"; |
10535 |
| - return type ? type + " " + formattingEscape : formattingEscape; |
10536 |
| - } |
10537 |
| - } |
10538 |
| - |
10539 | 10535 | // Matches link titles present on next line
|
10540 | 10536 | if (state.linkTitle) {
|
10541 | 10537 | state.linkTitle = false;
|
@@ -10571,6 +10567,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
10571 | 10567 | return getType(state);
|
10572 | 10568 | }
|
10573 | 10569 |
|
| 10570 | + if (ch === '\\') { |
| 10571 | + stream.next(); |
| 10572 | + if (modeCfg.highlightFormatting) { |
| 10573 | + var type = getType(state); |
| 10574 | + var formattingEscape = tokenTypes.formatting + "-escape"; |
| 10575 | + return type ? type + " " + formattingEscape : formattingEscape; |
| 10576 | + } |
| 10577 | + } |
| 10578 | + |
10574 | 10579 | if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
10575 | 10580 | stream.match(/\[[^\]]*\]/);
|
10576 | 10581 | state.inline = state.f = linkHref;
|
@@ -10999,14 +11004,15 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
|
10999 | 11004 | {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
|
11000 | 11005 | {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
|
11001 | 11006 | {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
|
| 11007 | + {name: "FCL", mime: "text/x-fcl", mode: "fcl"}, |
11002 | 11008 | {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
|
11003 | 11009 | {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
|
11004 | 11010 | {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
|
11005 | 11011 | {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
|
11006 | 11012 | {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
|
11007 | 11013 | {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history).md$/i},
|
11008 | 11014 | {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
|
11009 |
| - {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy"]}, |
| 11015 | + {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"]}, |
11010 | 11016 | {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
|
11011 | 11017 | {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
|
11012 | 11018 | {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
|
@@ -11035,7 +11041,7 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
|
11035 | 11041 | {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
|
11036 | 11042 | {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb"]},
|
11037 | 11043 | {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
|
11038 |
| - {name: "MUMPS", mime: "text/x-mumps", mode: "mumps"}, |
| 11044 | + {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]}, |
11039 | 11045 | {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
|
11040 | 11046 | {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
|
11041 | 11047 | {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
|
@@ -11078,7 +11084,6 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
|
11078 | 11084 | {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
|
11079 | 11085 | {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
|
11080 | 11086 | {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
|
11081 |
| - {name: "MariaDB", mime: "text/x-mariadb", mode: "sql"}, |
11082 | 11087 | {name: "sTeX", mime: "text/x-stex", mode: "stex"},
|
11083 | 11088 | {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"], alias: ["tex"]},
|
11084 | 11089 | {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
|
@@ -11392,7 +11397,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
|
11392 | 11397 | if (state.context && state.context.tagName != tagName &&
|
11393 | 11398 | config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
11394 | 11399 | popContext(state);
|
11395 |
| - if (state.context && state.context.tagName == tagName) { |
| 11400 | + if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) { |
11396 | 11401 | setStyle = "tag";
|
11397 | 11402 | return closeState;
|
11398 | 11403 | } else {
|
@@ -14100,7 +14105,7 @@ var toolbarBuiltInButtons = {
|
14100 | 14105 | },
|
14101 | 14106 | "guide": {
|
14102 | 14107 | name: "guide",
|
14103 |
| - action: "http://nextstepwebs.github.io/simplemde-markdown-editor/markdown-guide", |
| 14108 | + action: "https://simplemde.com/markdown-guide", |
14104 | 14109 | className: "fa fa-question-circle",
|
14105 | 14110 | title: "Markdown Guide",
|
14106 | 14111 | default: true
|
@@ -14278,7 +14283,9 @@ SimpleMDE.prototype.markdown = function(text) {
|
14278 | 14283 |
|
14279 | 14284 |
|
14280 | 14285 | // Update options
|
14281 |
| - if(this.options && this.options.renderingConfig && this.options.renderingConfig.singleLineBreaks !== false) { |
| 14286 | + if(this.options && this.options.renderingConfig && this.options.renderingConfig.singleLineBreaks === false) { |
| 14287 | + markedOptions.breaks = false; |
| 14288 | + } else { |
14282 | 14289 | markedOptions.breaks = true;
|
14283 | 14290 | }
|
14284 | 14291 |
|
|
0 commit comments