code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function getLines(doc, from, to) { var out = []; doc.iter(from, to, function(line) { out.push(line.text); }); return out; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getLines
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function updateLineHeight(line, height) { var diff = height - line.height; if (diff) for (var n = line; n; n = n.parent) n.height += diff; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
updateLineHeight
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineNo(line) { if (line.parent == null) return null; var cur = line.parent, no = indexOf(cur.lines, line); for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { for (var i = 0;; ++i) { if (chunk.children[i] == cur) break; no += chunk.children[i].chunkSize();...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineNo
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineAtHeight(chunk, h) { var n = chunk.first; outer: do { for (var i = 0; i < chunk.children.length; ++i) { var child = chunk.children[i], ch = child.height; if (h < ch) { chunk = child; continue outer; } h -= ch; n += child.chunkSize(); } return n; ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineAtHeight
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function heightAtLine(lineObj) { lineObj = visualLine(lineObj); var h = 0, chunk = lineObj.parent; for (var i = 0; i < chunk.lines.length; ++i) { var line = chunk.lines[i]; if (line == lineObj) break; else h += line.height; } for (var p = chunk.parent; p; chunk = p, p = chunk.pare...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
heightAtLine
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getOrder(line) { var order = line.order; if (order == null) order = line.order = bidiOrdering(line.text); return order; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getOrder
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function History(startGen) { // Arrays of change events and selections. Doing something adds an // event to done and clears undo. Undoing moves events from done // to undone, redoing moves them in the other direction. this.done = []; this.undone = []; this.undoDepth = Infinity; // Used to track ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
History
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function historyChangeFromChange(doc, change) { var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, chang...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
historyChangeFromChange
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function clearSelectionEvents(array) { while (array.length) { var last = lst(array); if (last.ranges) array.pop(); else break; } }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
clearSelectionEvents
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lastChangeEvent(hist, force) { if (force) { clearSelectionEvents(hist.done); return lst(hist.done); } else if (hist.done.length && !lst(hist.done).ranges) { return lst(hist.done); } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { hist.done.pop(); ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lastChangeEvent
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function addChangeToHistory(doc, change, selAfter, opId) { var hist = doc.history; hist.undone.length = 0; var time = +new Date, cur; if ((hist.lastOp == opId || hist.lastOrigin == change.origin && change.origin && ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
addChangeToHistory
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function selectionEventCanBeMerged(doc, origin, prev, sel) { var ch = origin.charAt(0); return ch == "*" || ch == "+" && prev.ranges.length == sel.ranges.length && prev.somethingSelected() == sel.somethingSelected() && new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.histor...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
selectionEventCanBeMerged
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function addSelectionToHistory(doc, sel, opId, options) { var hist = doc.history, origin = options && options.origin; // A new event is started when the previous origin does not match // the current, or the origins don't allow matching. Origins // starting with * are always merged, those starting with ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
addSelectionToHistory
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function pushSelectionToHistory(sel, dest) { var top = lst(dest); if (!(top && top.ranges && top.equals(sel))) dest.push(sel); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
pushSelectionToHistory
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function attachLocalSpans(doc, change, from, to) { var existing = change["spans_" + doc.id], n = 0; doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { if (line.markedSpans) (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
attachLocalSpans
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function removeClearedSpans(spans) { if (!spans) return null; for (var i = 0, out; i < spans.length; ++i) { if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } else if (out) out.push(spans[i]); } return !out ? spans : out.length ? out : null; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
removeClearedSpans
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getOldSpans(doc, change) { var found = change["spans_" + doc.id]; if (!found) return null; for (var i = 0, nw = []; i < change.text.length; ++i) nw.push(removeClearedSpans(found[i])); return nw; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getOldSpans
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function copyHistoryArray(events, newGroup, instantiateSel) { for (var i = 0, copy = []; i < events.length; ++i) { var event = events[i]; if (event.ranges) { copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); continue; } var changes = event.changes,...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
copyHistoryArray
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function rebaseHistSelSingle(pos, from, to, diff) { if (to < pos.line) { pos.line += diff; } else if (from < pos.line) { pos.line = from; pos.ch = 0; } }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
rebaseHistSelSingle
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function rebaseHistArray(array, from, to, diff) { for (var i = 0; i < array.length; ++i) { var sub = array[i], ok = true; if (sub.ranges) { if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } for (var j = 0; j < sub.ranges.length; j++) { rebaseHistSelSingle...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
rebaseHistArray
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function rebaseHist(hist, change) { var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; rebaseHistArray(hist.done, from, to, diff); rebaseHistArray(hist.undone, from, to, diff); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
rebaseHist
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function e_defaultPrevented(e) { return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
e_defaultPrevented
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function e_button(e) { var b = e.which; if (b == null) { if (e.button & 1) b = 1; else if (e.button & 2) b = 3; else if (e.button & 4) b = 2; } if (mac && e.ctrlKey && b == 1) b = 3; return b; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
e_button
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getHandlers(emitter, type, copy) { var arr = emitter._handlers && emitter._handlers[type] if (copy) return arr && arr.length > 0 ? arr.slice() : noHandlers else return arr || noHandlers }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getHandlers
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function signalLater(emitter, type /*, values...*/) { var arr = getHandlers(emitter, type, false) if (!arr.length) return; var args = Array.prototype.slice.call(arguments, 2), list; if (operationGroup) { list = operationGroup.delayedCallbacks; } else if (orphanDelayedCallbacks) { list = ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
signalLater
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function fireOrphanDelayed() { var delayed = orphanDelayedCallbacks; orphanDelayedCallbacks = null; for (var i = 0; i < delayed.length; ++i) delayed[i](); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
fireOrphanDelayed
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function signalDOMEvent(cm, e, override) { if (typeof e == "string") e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; signal(cm, override || e.type, cm, e); return e_defaultPrevented(e) || e.codemirrorIgnore; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
signalDOMEvent
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function signalCursorActivity(cm) { var arr = cm._handlers && cm._handlers.cursorActivity; if (!arr) return; var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) set.push(arr[i]); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
signalCursorActivity
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function hasHandler(emitter, type) { return getHandlers(emitter, type).length > 0 }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
hasHandler
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function eventMixin(ctor) { ctor.prototype.on = function(type, f) {on(this, type, f);}; ctor.prototype.off = function(type, f) {off(this, type, f);}; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
eventMixin
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function spaceStr(n) { while (spaceStrs.length <= n) spaceStrs.push(lst(spaceStrs) + " "); return spaceStrs[n]; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
spaceStr
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function indexOf(array, elt) { for (var i = 0; i < array.length; ++i) if (array[i] == elt) return i; return -1; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
indexOf
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function map(array, f) { var out = []; for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); return out; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
map
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function createObj(base, props) { var inst; if (Object.create) { inst = Object.create(base); } else { nothing.prototype = base; inst = new nothing(); } if (props) copyObj(props, inst); return inst; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
createObj
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function copyObj(obj, target, overwrite) { if (!target) target = {}; for (var prop in obj) if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) target[prop] = obj[prop]; return target; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
copyObj
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function bind(f) { var args = Array.prototype.slice.call(arguments, 1); return function(){return f.apply(null, args);}; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
bind
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function isWordChar(ch, helper) { if (!helper) return isWordCharBasic(ch); if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; return helper.test(ch); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
isWordChar
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function isEmpty(obj) { for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; return true; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
isEmpty
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function elt(tag, content, className, style) { var e = document.createElement(tag); if (className) e.className = className; if (style) e.style.cssText = style; if (typeof content == "string") e.appendChild(document.createTextNode(content)); else if (content) for (var i = 0; i < content.length; ++i) ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
elt
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function removeChildren(e) { for (var count = e.childNodes.length; count > 0; --count) e.removeChild(e.firstChild); return e; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
removeChildren
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function removeChildrenAndAdd(parent, e) { return removeChildren(parent).appendChild(e); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
removeChildrenAndAdd
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function activeElt() { var activeElement = document.activeElement; while (activeElement && activeElement.root && activeElement.root.activeElement) activeElement = activeElement.root.activeElement; return activeElement; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
activeElt
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function joinClasses(a, b) { var as = a.split(" "); for (var i = 0; i < as.length; i++) if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; return b; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
joinClasses
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function forEachCodeMirror(f) { if (!document.body.getElementsByClassName) return; var byClass = document.body.getElementsByClassName("CodeMirror"); for (var i = 0; i < byClass.length; i++) { var cm = byClass[i].CodeMirror; if (cm) f(cm); } }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
forEachCodeMirror
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function ensureGlobalHandlers() { if (globalsRegistered) return; registerGlobalHandlers(); globalsRegistered = true; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
ensureGlobalHandlers
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function registerGlobalHandlers() { // When the window resizes, we need to refresh active editors. var resizeTimer; on(window, "resize", function() { if (resizeTimer == null) resizeTimer = setTimeout(function() { resizeTimer = null; forEachCodeMirror(onResize); }, 100); }); ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
registerGlobalHandlers
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function zeroWidthElement(measure) { if (zwspSupported == null) { var test = elt("span", "\u200b"); removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); if (measure.firstChild.offsetHeight != 0) zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
zeroWidthElement
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function hasBadBidiRects(measure) { if (badBidiRects != null) return badBidiRects; var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); var r0 = range(txt, 0, 1).getBoundingClientRect(); if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
hasBadBidiRects
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function hasBadZoomedRects(measure) { if (badZoomedRects != null) return badZoomedRects; var node = removeChildrenAndAdd(measure, elt("span", "x")); var normal = node.getBoundingClientRect(); var fromRange = range(node, 0, 1).getBoundingClientRect(); return badZoomedRects = Math.abs(normal.left - fr...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
hasBadZoomedRects
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function iterateBidiSections(order, from, to, f) { if (!order) return f(from, to, "ltr"); var found = false; for (var i = 0; i < order.length; ++i) { var part = order[i]; if (part.from < to && part.to > from || from == to && part.to == from) { f(Math.max(part.from, from), Math.min(part.t...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
iterateBidiSections
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineRight(line) { var order = getOrder(line); if (!order) return line.text.length; return bidiRight(lst(order)); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineRight
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineStart(cm, lineN) { var line = getLine(cm.doc, lineN); var visual = visualLine(line); if (visual != line) lineN = lineNo(visual); var order = getOrder(visual); var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); return Pos(lineN, ch); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineStart
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineEnd(cm, lineN) { var merged, line = getLine(cm.doc, lineN); while (merged = collapsedSpanAtEnd(line)) { line = merged.find(1, true).line; lineN = null; } var order = getOrder(line); var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineEnd
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineStartSmart(cm, pos) { var start = lineStart(cm, pos.line); var line = getLine(cm.doc, start.line); var order = getOrder(line); if (!order || order[0].level == 0) { var firstNonWS = Math.max(0, line.text.search(/\S/)); var inWS = pos.line == start.line && pos.ch <= firstNonWS && ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineStartSmart
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function compareBidiLevel(order, a, b) { var linedir = order[0].level; if (a == linedir) return true; if (b == linedir) return false; return a < b; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
compareBidiLevel
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getBidiPartAt(order, pos) { bidiOther = null; for (var i = 0, found; i < order.length; ++i) { var cur = order[i]; if (cur.from < pos && cur.to > pos) return i; if ((cur.from == pos || cur.to == pos)) { if (found == null) { found = i; } else if (compareBidiLev...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getBidiPartAt
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function moveInLine(line, pos, dir, byUnit) { if (!byUnit) return pos + dir; do pos += dir; while (pos > 0 && isExtendingChar(line.text.charAt(pos))); return pos; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
moveInLine
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function moveVisually(line, start, dir, byUnit) { var bidi = getOrder(line); if (!bidi) return moveLogically(line, start, dir, byUnit); var pos = getBidiPartAt(bidi, start), part = bidi[pos]; var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); for (;;) { if (target > pa...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
moveVisually
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function moveLogically(line, start, dir, byUnit) { var target = start + dir; if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; return target < 0 || target > line.text.length ? null : target; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
moveLogically
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function charType(code) { if (code <= 0xf7) return lowTypes.charAt(code); else if (0x590 <= code && code <= 0x5f4) return "R"; else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); else if (0x6ee <= code && code <= 0x8ac) return "r"; else if (0x2000 <= code && c...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
charType
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function BidiSpan(level, from, to) { this.level = level; this.from = from; this.to = to; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
BidiSpan
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function blankLine(state) { state.code = false; return null; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
blankLine
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getMode(name) { if (CodeMirror.findModeByName) { var found = CodeMirror.findModeByName(name); if (found) name = found.mime || found.mimes[0]; } var mode = CodeMirror.getMode(cmCfg, name); return mode.name == "null" ? null : mode; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getMode
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function switchInline(stream, state, f) { state.f = state.inline = f; return f(stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
switchInline
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function switchBlock(stream, state, f) { state.f = state.block = f; return f(stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
switchBlock
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function lineIsEmpty(line) { return !line || !/\S/.test(line.string) }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
lineIsEmpty
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function blankLine(state) { // Reset linkTitle state state.linkTitle = false; // Reset EM state state.em = false; // Reset STRONG state state.strong = false; // Reset strikethrough state state.strikethrough = false; // Reset state.quote state.quote = 0; // Reset state.indente...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
blankLine
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function blockNormal(stream, state) { var sol = stream.sol(); var prevLineIsList = state.list !== false, prevLineIsIndentedCode = state.indentedCode; state.indentedCode = false; if (prevLineIsList) { if (state.indentationDiff >= 0) { // Continued list if (state.indentationDiff ...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
blockNormal
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function htmlBlock(stream, state) { var style = htmlMode.token(stream, state.htmlState); if (!htmlModeMissing) { var inner = CodeMirror.innerMode(htmlMode, state.htmlState) if ((inner.mode.name == "xml" && inner.state.tagStart === null && (!inner.state.context && inner.state.tokenize.isIn...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
htmlBlock
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function local(stream, state) { if (state.fencedChars && stream.match(state.fencedChars, false)) { state.localMode = state.localState = null; state.f = state.block = leavingLocal; return null; } else if (state.localMode) { return state.localMode.token(stream, state.localState); } els...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
local
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function leavingLocal(stream, state) { stream.match(state.fencedChars); state.block = blockNormal; state.f = inlineNormal; state.fencedChars = null; if (modeCfg.highlightFormatting) state.formatting = "code-block"; state.code = 1 var returnType = getType(state); state.code = 0 return...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
leavingLocal
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getType(state) { var styles = []; if (state.formatting) { styles.push(tokenTypes.formatting); if (typeof state.formatting === "string") state.formatting = [state.formatting]; for (var i = 0; i < state.formatting.length; i++) { styles.push(tokenTypes.formatting + "-" + state...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getType
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function handleText(stream, state) { if (stream.match(textRE, true)) { return getType(state); } return undefined; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
handleText
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function inlineNormal(stream, state) { var style = state.text(stream, state); if (typeof style !== 'undefined') return style; if (state.list) { // List marker (*, +, -, 1., etc) state.list = null; return getType(state); } if (state.taskList) { var taskOpen = stream.match(ta...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
inlineNormal
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function linkInline(stream, state) { var ch = stream.next(); if (ch === ">") { state.f = state.inline = inlineNormal; if (modeCfg.highlightFormatting) state.formatting = "link"; var type = getType(state); if (type){ type += " "; } else { type = ""; } re...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
linkInline
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function linkHref(stream, state) { // Check if space, and return NULL if so (to avoid marking the space) if(stream.eatSpace()){ return null; } var ch = stream.next(); if (ch === '(' || ch === '[') { state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]", 0); if (modeCfg....
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
linkHref
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function getLinkHrefInside(endChar) { return function(stream, state) { var ch = stream.next(); if (ch === endChar) { state.f = state.inline = inlineNormal; if (modeCfg.highlightFormatting) state.formatting = "link-string"; var returnState = getType(state); state.linkHref...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
getLinkHrefInside
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function footnoteLink(stream, state) { if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) { state.f = footnoteLinkInside; stream.next(); // Consume [ if (modeCfg.highlightFormatting) state.formatting = "link"; state.linkText = true; return getType(state); } return switchInline(stre...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
footnoteLink
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function footnoteLinkInside(stream, state) { if (stream.match(/^\]:/, true)) { state.f = state.inline = footnoteUrl; if (modeCfg.highlightFormatting) state.formatting = "link"; var returnType = getType(state); state.linkText = false; return returnType; } stream.match(/^([^\]\\...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
footnoteLinkInside
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function footnoteUrl(stream, state) { // Check if space, and return NULL if so (to avoid marking the space) if(stream.eatSpace()){ return null; } // Match URL stream.match(/^[^\s]+/, true); // Check for link title if (stream.peek() === undefined) { // End of line, set flag to check nex...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
footnoteUrl
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function inText(stream, state) { function chain(parser) { state.tokenize = parser; return parser(stream, state); } var ch = stream.next(); if (ch == "<") { if (stream.eat("!")) { if (stream.eat("[")) { if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
inText
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function chain(parser) { state.tokenize = parser; return parser(stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
chain
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function inTag(stream, state) { var ch = stream.next(); if (ch == ">" || (ch == "/" && stream.eat(">"))) { state.tokenize = inText; type = ch == ">" ? "endTag" : "selfcloseTag"; return "tag bracket"; } else if (ch == "=") { type = "equals"; return null; } else if (ch == "<"...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
inTag
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function inAttribute(quote) { var closure = function(stream, state) { while (!stream.eol()) { if (stream.next() == quote) { state.tokenize = inTag; break; } } return "string"; }; closure.isInAttribute = true; return closure; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
inAttribute
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
closure = function(stream, state) { while (!stream.eol()) { if (stream.next() == quote) { state.tokenize = inTag; break; } } return "string"; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
closure
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function inBlock(style, terminator) { return function(stream, state) { while (!stream.eol()) { if (stream.match(terminator)) { state.tokenize = inText; break; } stream.next(); } return style; }; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
inBlock
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function doctype(depth) { return function(stream, state) { var ch; while ((ch = stream.next()) != null) { if (ch == "<") { state.tokenize = doctype(depth + 1); return state.tokenize(stream, state); } else if (ch == ">") { if (depth == 1) { state....
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
doctype
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function Context(state, tagName, startOfLine) { this.prev = state.context; this.tagName = tagName; this.indent = state.indented; this.startOfLine = startOfLine; if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent)) this.noIndent = true; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
Context
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function popContext(state) { if (state.context) state.context = state.context.prev; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
popContext
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function maybePopContext(state, nextTagName) { var parentTagName; while (true) { if (!state.context) { return; } parentTagName = state.context.tagName; if (!config.contextGrabbers.hasOwnProperty(parentTagName) || !config.contextGrabbers[parentTagName].hasOwnProperty(nex...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
maybePopContext
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function baseState(type, stream, state) { if (type == "openTag") { state.tagStart = stream.column(); return tagNameState; } else if (type == "closeTag") { return closeTagNameState; } else { return baseState; } }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
baseState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function tagNameState(type, stream, state) { if (type == "word") { state.tagName = stream.current(); setStyle = "tag"; return attrState; } else { setStyle = "error"; return tagNameState; } }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
tagNameState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function closeTagNameState(type, stream, state) { if (type == "word") { var tagName = stream.current(); if (state.context && state.context.tagName != tagName && config.implicitlyClosed.hasOwnProperty(state.context.tagName)) popContext(state); if ((state.context && state.context.t...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
closeTagNameState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function closeState(type, _stream, state) { if (type != "endTag") { setStyle = "error"; return closeState; } popContext(state); return baseState; }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
closeState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function closeStateErr(type, stream, state) { setStyle = "error"; return closeState(type, stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
closeStateErr
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function attrState(type, _stream, state) { if (type == "word") { setStyle = "attribute"; return attrEqState; } else if (type == "endTag" || type == "selfcloseTag") { var tagName = state.tagName, tagStart = state.tagStart; state.tagName = state.tagStart = null; if (type == "selfclos...
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
attrState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function attrEqState(type, stream, state) { if (type == "equals") return attrValueState; if (!config.allowMissing) setStyle = "error"; return attrState(type, stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
attrEqState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function attrValueState(type, stream, state) { if (type == "string") return attrContinuedState; if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;} setStyle = "error"; return attrState(type, stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
attrValueState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function attrContinuedState(type, stream, state) { if (type == "string") return attrContinuedState; return attrState(type, stream, state); }
Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
attrContinuedState
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT
function addWord(word, rules) { // Some dictionaries will list the same word multiple times with different rule sets. if (!(word in dictionaryTable) || typeof dictionaryTable[word] != 'object') { dictionaryTable[word] = []; } dictionaryTable[word].push(rules); }
Parses the words out from the .dic file. @param {String} data The data from the dictionary file. @returns object The lookup table containing all of the words and word forms from the dictionary.
addWord
javascript
sparksuite/simplemde-markdown-editor
debug/simplemde.debug.js
https://github.com/sparksuite/simplemde-markdown-editor/blob/master/debug/simplemde.debug.js
MIT