PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 2.0.7
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v2.0.7
4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 All 340 releases
profile-builder / assets / lib / codemirror / addon / edit / continuelist.js

continuelist.js in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 2.0.7, at assets/lib/codemirror/addon/edit/continuelist.js

26 lines 652 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function() {
2 'use strict';
3
4 var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/,
5 unorderedBullets = '*+-';
6
7 CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
8 var pos = cm.getCursor(),
9 inList = cm.getStateAfter(pos.line).list,
10 match;
11
12 if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {
13 cm.execCommand('newlineAndIndent');
14 return;
15 }
16
17 var indent = match[1], after = match[4];
18 var bullet = unorderedBullets.indexOf(match[2]) >= 0
19 ? match[2]
20 : (parseInt(match[3], 10) + 1) + '.';
21
22 cm.replaceSelection('\n' + indent + bullet + after, 'end');
23 };
24
25 }());
26