aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/coffeescript
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-17 11:29:09 -0700
committerValerio Virgillito2012-07-17 11:29:09 -0700
commit58e86247524cc2d545bd6884f1b5c9fdba3b9164 (patch)
tree53305d354fce502ee39378babf47ace6c91ce2fd /imports/codemirror/mode/coffeescript
parent0f0cffd4df85e7adf5081fe66c768c70b2ead9b3 (diff)
parent4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff)
downloadninja-58e86247524cc2d545bd6884f1b5c9fdba3b9164.tar.gz
Merge branch 'refs/heads/master' into v0.7.1
Diffstat (limited to 'imports/codemirror/mode/coffeescript')
-rw-r--r--imports/codemirror/mode/coffeescript/coffeescript.js6
-rw-r--r--imports/codemirror/mode/coffeescript/index.html6
2 files changed, 12 insertions, 0 deletions
diff --git a/imports/codemirror/mode/coffeescript/coffeescript.js b/imports/codemirror/mode/coffeescript/coffeescript.js
index 4f2bd66d..dece5f8a 100644
--- a/imports/codemirror/mode/coffeescript/coffeescript.js
+++ b/imports/codemirror/mode/coffeescript/coffeescript.js
@@ -60,6 +60,12 @@ CodeMirror.defineMode('coffeescript', function(conf) {
60 60
61 var ch = stream.peek(); 61 var ch = stream.peek();
62 62
63 // Handle docco title comment (single line)
64 if (stream.match("####")) {
65 stream.skipToEnd();
66 return 'comment';
67 }
68
63 // Handle multi line comments 69 // Handle multi line comments
64 if (stream.match("###")) { 70 if (stream.match("###")) {
65 state.tokenize = longComment; 71 state.tokenize = longComment;
diff --git a/imports/codemirror/mode/coffeescript/index.html b/imports/codemirror/mode/coffeescript/index.html
index 127c4bf9..98bd4971 100644
--- a/imports/codemirror/mode/coffeescript/index.html
+++ b/imports/codemirror/mode/coffeescript/index.html
@@ -46,12 +46,18 @@ root = this
46# Save the previous value of the `_` variable. 46# Save the previous value of the `_` variable.
47previousUnderscore = root._ 47previousUnderscore = root._
48 48
49### Multiline
50 comment
51###
49 52
50# Establish the object that gets thrown to break out of a loop iteration. 53# Establish the object that gets thrown to break out of a loop iteration.
51# `StopIteration` is SOP on Mozilla. 54# `StopIteration` is SOP on Mozilla.
52breaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration 55breaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration
53 56
54 57
58#### Docco style single line comment (title)
59
60
55# Helper function to escape **RegExp** contents, because JS doesn't have one. 61# Helper function to escape **RegExp** contents, because JS doesn't have one.
56escapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1') 62escapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1')
57 63