fix toggleComment command in php mode
This commit is contained in:
parent
3fa54ce97e
commit
ec18d9493d
1 changed files with 22 additions and 20 deletions
|
|
@ -55,6 +55,24 @@ oop.inherits(PhpMode, TextMode);
|
||||||
|
|
||||||
(function() {
|
(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) {
|
this.getNextLineIndent = function(state, line, tab) {
|
||||||
var indent = this.$getIndent(line);
|
var indent = this.$getIndent(line);
|
||||||
|
|
||||||
|
|
@ -100,8 +118,10 @@ oop.inherits(PhpMode, TextMode);
|
||||||
|
|
||||||
var Mode = function(opts) {
|
var Mode = function(opts) {
|
||||||
if (opts && opts.inline) {
|
if (opts && opts.inline) {
|
||||||
PhpMode.call(this);
|
var mode = new PhpMode();
|
||||||
return;
|
mode.createWorker = this.createWorker;
|
||||||
|
mode.inlinePhp = true;
|
||||||
|
return mode;
|
||||||
}
|
}
|
||||||
HtmlMode.call(this);
|
HtmlMode.call(this);
|
||||||
this.HighlightRules = PhpHighlightRules;
|
this.HighlightRules = PhpHighlightRules;
|
||||||
|
|
@ -116,24 +136,6 @@ oop.inherits(Mode, HtmlMode);
|
||||||
|
|
||||||
(function() {
|
(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) {
|
this.createWorker = function(session) {
|
||||||
var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
|
var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
|
||||||
worker.attachToDocument(session.getDocument());
|
worker.attachToDocument(session.getDocument());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue