fix toggleComment command in php mode

This commit is contained in:
nightwing 2014-11-21 01:04:11 +04:00
commit ec18d9493d

View file

@ -55,6 +55,24 @@ oop.inherits(PhpMode, TextMode);
(function() {
this.tokenRe = new RegExp("^["
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]+", "g"
);
this.nonTokenRe = new RegExp("^(?:[^"
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]|\s])+", "g"
);
this.lineCommentStart = ["//", "#"];
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
@ -100,8 +118,10 @@ oop.inherits(PhpMode, TextMode);
var Mode = function(opts) {
if (opts && opts.inline) {
PhpMode.call(this);
return;
var mode = new PhpMode();
mode.createWorker = this.createWorker;
mode.inlinePhp = true;
return mode;
}
HtmlMode.call(this);
this.HighlightRules = PhpHighlightRules;
@ -116,24 +136,6 @@ oop.inherits(Mode, HtmlMode);
(function() {
this.tokenRe = new RegExp("^["
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]+", "g"
);
this.nonTokenRe = new RegExp("^(?:[^"
+ unicode.packages.L
+ unicode.packages.Mn + unicode.packages.Mc
+ unicode.packages.Nd
+ unicode.packages.Pc + "\_]|\s])+", "g"
);
this.lineCommentStart = ["//", "#"];
this.blockComment = {start: "/*", end: "*/"};
this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
worker.attachToDocument(session.getDocument());