Skip to content

Commit 435b39f

Browse files
author
Wes Cossick
committed
Update dependencies
1 parent 787ed40 commit 435b39f

File tree

5 files changed

+101
-86
lines changed

5 files changed

+101
-86
lines changed

debug/simplemde.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
203203
white-space: normal;
204204
height: 100%;
205205
display: inline-block;
206+
vertical-align: top;
206207
margin-bottom: -30px;
207208
/* Hack to make IE7 behave */
208209
*zoom:1;

debug/simplemde.debug.js

Lines changed: 46 additions & 39 deletions
Large diffs are not rendered by default.

debug/simplemde.js

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(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){
88
(function (global){
99

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");
1111
CodeMirror = global.CodeMirror = require("codemirror");
1212
; var __browserify_shim_require__=require;(function browserifyShim(module, define, require) {
1313
// Initialize data globally to reduce memory consumption
@@ -105,7 +105,7 @@ if(!String.prototype.includes) {
105105
}).call(global, module, undefined, undefined);
106106

107107
}).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){
109109
(function (global){
110110
; var __browserify_shim_require__=require;(function browserifyShim(module, exports, require, define, browserify_shim__define__module__export__) {
111111
'use strict';
@@ -1670,6 +1670,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
16701670

16711671
d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
16721672
d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
1673+
d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"
16731674

16741675
if (sizes.right && sizes.bottom) {
16751676
d.scrollbarFiller.style.display = "block";
@@ -1914,9 +1915,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
19141915

19151916
function setDocumentHeight(cm, measure) {
19161917
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";
19201921
}
19211922

19221923
// Read the actual heights of the rendered lines, and update their
@@ -2609,10 +2610,11 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
26092610
if (reset && cm.doc.sel.contains(pos) == -1)
26102611
operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
26112612

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: " +
26162618
(ie ? "rgba(255, 255, 255, .05)" : "transparent") +
26172619
"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
26182620
if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)
@@ -2643,7 +2645,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
26432645
}
26442646
function rehide() {
26452647
input.contextMenuPending = false;
2646-
input.wrapper.style.position = "relative";
2648+
input.wrapper.style.cssText = oldWrapperCSS
26472649
te.style.cssText = oldCSS;
26482650
if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
26492651

@@ -8747,9 +8749,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
87478749
var spans = line.markedSpans;
87488750
if (spans) for (var i = 0; i < spans.length; i++) {
87498751
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) &&
87538755
(!filter || filter(span.marker)))
87548756
found.push(span.marker.parent || span.marker);
87558757
}
@@ -10011,7 +10013,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
1001110013

1001210014
// THE END
1001310015

10014-
CodeMirror.version = "5.11.1";
10016+
CodeMirror.version = "5.12.1";
1001510017

1001610018
return CodeMirror;
1001710019
});
@@ -10164,8 +10166,8 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
1016410166

1016510167
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
1016610168

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"
1016910171

1017010172
function getMode(name) {
1017110173
if (CodeMirror.findModeByName) {
@@ -10270,7 +10272,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
1027010272
state.quote = 0;
1027110273
// Reset state.indentedCode
1027210274
state.indentedCode = false;
10273-
if (!htmlFound && state.f == htmlBlock) {
10275+
if (htmlModeMissing && state.f == htmlBlock) {
1027410276
state.f = inlineNormal;
1027510277
state.block = blockNormal;
1027610278
}
@@ -10373,12 +10375,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
1037310375

1037410376
function htmlBlock(stream, state) {
1037510377
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+
}
1038210387
}
1038310388
return style;
1038410389
}
@@ -10527,15 +10532,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
1052710532

1052810533
var ch = stream.next();
1052910534

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-
1053910535
// Matches link titles present on next line
1054010536
if (state.linkTitle) {
1054110537
state.linkTitle = false;
@@ -10571,6 +10567,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
1057110567
return getType(state);
1057210568
}
1057310569

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+
1057410579
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
1057510580
stream.match(/\[[^\]]*\]/);
1057610581
state.inline = state.f = linkHref;
@@ -10999,14 +11004,15 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
1099911004
{name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
1100011005
{name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
1100111006
{name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
11007+
{name: "FCL", mime: "text/x-fcl", mode: "fcl"},
1100211008
{name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
1100311009
{name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
1100411010
{name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
1100511011
{name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
1100611012
{name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
1100711013
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history).md$/i},
1100811014
{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"]},
1101011016
{name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
1101111017
{name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
1101211018
{name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
@@ -11035,7 +11041,7 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
1103511041
{name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
1103611042
{name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb"]},
1103711043
{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"]},
1103911045
{name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
1104011046
{name: "MySQL", mime: "text/x-mysql", mode: "sql"},
1104111047
{name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
@@ -11078,7 +11084,6 @@ CodeMirror.defineMIME("text/x-markdown", "markdown");
1107811084
{name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
1107911085
{name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
1108011086
{name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
11081-
{name: "MariaDB", mime: "text/x-mariadb", mode: "sql"},
1108211087
{name: "sTeX", mime: "text/x-stex", mode: "stex"},
1108311088
{name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"], alias: ["tex"]},
1108411089
{name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
@@ -11392,7 +11397,7 @@ CodeMirror.defineMode("xml", function(editorConf, config_) {
1139211397
if (state.context && state.context.tagName != tagName &&
1139311398
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
1139411399
popContext(state);
11395-
if (state.context && state.context.tagName == tagName) {
11400+
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
1139611401
setStyle = "tag";
1139711402
return closeState;
1139811403
} else {
@@ -14100,7 +14105,7 @@ var toolbarBuiltInButtons = {
1410014105
},
1410114106
"guide": {
1410214107
name: "guide",
14103-
action: "http://nextstepwebs.github.io/simplemde-markdown-editor/markdown-guide",
14108+
action: "https://simplemde.com/markdown-guide",
1410414109
className: "fa fa-question-circle",
1410514110
title: "Markdown Guide",
1410614111
default: true
@@ -14278,7 +14283,9 @@ SimpleMDE.prototype.markdown = function(text) {
1427814283

1427914284

1428014285
// 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 {
1428214289
markedOptions.breaks = true;
1428314290
}
1428414291

0 commit comments

Comments
 (0)