-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from NextStepWebs/development
Autosaving, More options, Split out Font Awesome, Fix bugs
- Loading branch information
Showing
11 changed files
with
647 additions
and
2,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localtesting/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,4 @@ Minify the JS in this order: | |
|
||
Minify the CSS in this order: | ||
|
||
1. `theme.css` | ||
1. `font-awesome.css` | ||
1. `theme.css` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,93 @@ | ||
// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
// Distributed under an MIT license: http://codemirror.net/LICENSE | ||
|
||
(function(mod) { | ||
if (typeof exports == "object" && typeof module == "object") // CommonJS | ||
mod(require("../../lib/codemirror")); | ||
else if (typeof define == "function" && define.amd) // AMD | ||
define(["../../lib/codemirror"], mod); | ||
else // Plain browser env | ||
mod(CodeMirror); | ||
if (typeof exports == "object" && typeof module == "object") // CommonJS | ||
mod(require("../../lib/codemirror")); | ||
else if (typeof define == "function" && define.amd) // AMD | ||
define(["../../lib/codemirror"], mod); | ||
else // Plain browser env | ||
mod(CodeMirror); | ||
})(function(CodeMirror) { | ||
"use strict"; | ||
|
||
var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/, | ||
emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/, | ||
unorderedListRE = /[*+-]\s/; | ||
|
||
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { | ||
if (cm.getOption("disableInput")) return CodeMirror.Pass; | ||
var ranges = cm.listSelections(), replacements = []; | ||
for (var i = 0; i < ranges.length; i++) { | ||
var pos = ranges[i].head; | ||
var eolState = cm.getStateAfter(pos.line); | ||
var inList = eolState.list !== false; | ||
var inQuote = eolState.quote !== 0; | ||
|
||
var line = cm.getLine(pos.line), match = listRE.exec(line); | ||
if (!ranges[i].empty() || (!inList && !inQuote) || !match) { | ||
cm.execCommand("newlineAndIndent"); | ||
return; | ||
} | ||
if (emptyListRE.test(line)) { | ||
cm.replaceRange("", { | ||
line: pos.line, ch: 0 | ||
}, { | ||
line: pos.line, ch: pos.ch + 1 | ||
}); | ||
replacements[i] = "\n"; | ||
} else { | ||
var indent = match[1], after = match[5]; | ||
var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 | ||
? match[2] | ||
: (parseInt(match[3], 10) + 1) + match[4]; | ||
|
||
replacements[i] = "\n" + indent + bullet + after; | ||
} | ||
} | ||
|
||
cm.replaceSelections(replacements); | ||
}; | ||
"use strict"; | ||
|
||
var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/, | ||
emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/, | ||
unorderedListRE = /[*+-]\s/; | ||
|
||
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { | ||
if (cm.getOption("disableInput")) return CodeMirror.Pass; | ||
var ranges = cm.listSelections(), | ||
replacements = []; | ||
for (var i = 0; i < ranges.length; i++) { | ||
var pos = ranges[i].head; | ||
var eolState = cm.getStateAfter(pos.line); | ||
var inList = eolState.list !== false; | ||
var inQuote = eolState.quote !== 0; | ||
|
||
var line = cm.getLine(pos.line), | ||
match = listRE.exec(line); | ||
if (!ranges[i].empty() || (!inList && !inQuote) || !match) { | ||
cm.execCommand("newlineAndIndent"); | ||
return; | ||
} | ||
if (emptyListRE.test(line)) { | ||
cm.replaceRange("", { | ||
line: pos.line, | ||
ch: 0 | ||
}, { | ||
line: pos.line, | ||
ch: pos.ch + 1 | ||
}); | ||
replacements[i] = "\n"; | ||
} else { | ||
var indent = match[1], | ||
after = match[5]; | ||
var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 ? match[2] : (parseInt(match[3], 10) + 1) + match[4]; | ||
|
||
replacements[i] = "\n" + indent + bullet + after; | ||
} | ||
} | ||
|
||
cm.replaceSelections(replacements); | ||
}; | ||
|
||
CodeMirror.commands.shiftTabAndIndentContinueMarkdownList = function(cm) { | ||
var ranges = cm.listSelections(); | ||
var pos = ranges[0].head; | ||
var eolState = cm.getStateAfter(pos.line); | ||
var inList = eolState.list !== false; | ||
|
||
if (inList) { | ||
cm.execCommand('indentLess'); | ||
return; | ||
} | ||
|
||
if(cm.options.indentWithTabs){ | ||
cm.execCommand('insertTab'); | ||
} | ||
else{ | ||
var spaces = Array(cm.options.tabSize + 1).join(" "); | ||
cm.replaceSelection(spaces); | ||
} | ||
}; | ||
|
||
CodeMirror.commands.tabAndIndentContinueMarkdownList = function(cm) { | ||
var ranges = cm.listSelections(); | ||
var pos = ranges[0].head; | ||
var eolState = cm.getStateAfter(pos.line); | ||
var inList = eolState.list !== false; | ||
|
||
if (inList) { | ||
cm.execCommand('indentMore'); | ||
return; | ||
} | ||
|
||
if(cm.options.indentWithTabs){ | ||
cm.execCommand('insertTab'); | ||
} | ||
else{ | ||
var spaces = Array(cm.options.tabSize + 1).join(" "); | ||
cm.replaceSelection(spaces); | ||
} | ||
}; | ||
}); |
Oops, something went wrong.