Sha256: 288d372386552a0ddc176e3da83e1e1ce89da2ffb4f5c92bc3303f834d4af2a8
Contents?: true
Size: 652 Bytes
Versions: 32
Compression:
Stored size: 652 Bytes
Contents
(function() { 'use strict'; var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/, unorderedBullets = '*+-'; CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { var pos = cm.getCursor(), inList = cm.getStateAfter(pos.line).list, match; if (!inList || !(match = cm.getLine(pos.line).match(listRE))) { cm.execCommand('newlineAndIndent'); return; } var indent = match[1], after = match[4]; var bullet = unorderedBullets.indexOf(match[2]) >= 0 ? match[2] : (parseInt(match[3], 10) + 1) + '.'; cm.replaceSelection('\n' + indent + bullet + after, 'end'); }; }());
Version data entries
32 entries across 32 versions & 5 rubygems