-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve syntax highlighting in the editor #181
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
define("ace/mode/sequencebramp_highlight_rules", ["require", "exports", "module", "ace/lib/oop"], function(e, t, n) { | ||
"use strict"; | ||
var r = e("../lib/oop") | ||
, i = e("./text_highlight_rules").TextHighlightRules | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comma warnings can be turned off with 'laxcomma'. |
||
, s = function() { | ||
function t(e) { | ||
var t = /\w/.test(e) ? "\\b" : "(?:\\B|^)"; | ||
return t + e + "[^" + e + "].*?" + e + "(?![\\w*])" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing semicolon. |
||
} | ||
this.$rules = { | ||
start: [{ | ||
token: "comment", | ||
regex: /^\s*#.*/ | ||
}, { | ||
token: ["text", "string"], | ||
regex: /^(\s*title:)(.*)/, | ||
caseInsensitive: true, | ||
}, { | ||
// this doesn't handle commas well | ||
token: ["text", "keyword", "text", "string"], | ||
regex: /^(\s*note\s+(?:left\s+of|right\s+of|over)\s+)(.*)(:)(.*)/, | ||
caseInsensitive: true, | ||
}, { | ||
token: ["text", "string", "text", "keyword"], | ||
regex: /^(\s*participant\s+)(.*)(\bas\b)(.*)/, | ||
caseInsensitive: true, | ||
}, { | ||
token: ["text", "keyword"], | ||
regex: /^(\s*participant\s+)(.*)/, | ||
caseInsensitive: true, | ||
}, { | ||
token: ["keyword", "operator", "keyword", "text", "string"], | ||
regex: /^(\s*.*)(-?->>?)(.*)(\s*:\s*)(.*)?$/, | ||
}, | ||
]}; | ||
}; | ||
r.inherits(s, i), | ||
t.SequencebrampHighlightRules = s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an assignment or function call and instead saw an expression. |
||
}), | ||
define("ace/mode/sequencebramp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/sequencebramp_highlight_rules", "ace/mode/folding/sequencebramp"], | ||
function(e, t, n) { | ||
"use strict"; | ||
var r = e("../lib/oop") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Misleading line break before ','; readers may interpret this as an expression boundary. |
||
, i = e("./text").Mode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Misleading line break before ','; readers may interpret this as an expression boundary. |
||
, s = e("./sequencebramp_highlight_rules").SequencebrampHighlightRules | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Misleading line break before ','; readers may interpret this as an expression boundary. |
||
, u = function() { | ||
this.HighlightRules = s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing semicolon. |
||
}; | ||
r.inherits(u, i), | ||
function() { | ||
this.type = "text", | ||
this.$id = "ace/mode/sequencebramp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an assignment or function call and instead saw an expression. |
||
} | ||
.call(u.prototype), | ||
t.Mode = u | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an assignment or function call and instead saw an expression. |
||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an assignment or function call and instead saw an expression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misleading line break before ','; readers may interpret this as an expression boundary.