Skip to content
Snippets Groups Projects
Commit b61c9b67 authored by David Mignot's avatar David Mignot Committed by Marijn Haverbeke
Browse files

fix coffeescript comments with 4 #, which are single line comments formated as title in docco

parent 8b91b3ab
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,12 @@ CodeMirror.defineMode('coffeescript', function(conf) {
var ch = stream.peek();
// Handle docco title comment (single line)
if (stream.match("####")) {
stream.skipToEnd();
return 'comment';
}
// Handle multi line comments
if (stream.match("###")) {
state.tokenize = longComment;
......
......@@ -46,12 +46,18 @@ root = this
# Save the previous value of the `_` variable.
previousUnderscore = root._
### Multiline
comment
###
# Establish the object that gets thrown to break out of a loop iteration.
# `StopIteration` is SOP on Mozilla.
breaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration
#### Docco style single line comment (title)
# Helper function to escape **RegExp** contents, because JS doesn't have one.
escapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment