fix inline php mode
This commit is contained in:
parent
2bd2e37367
commit
366675a7a7
2 changed files with 71 additions and 4 deletions
|
|
@ -46,9 +46,7 @@ var JavaScriptMode = require("./javascript").Mode;
|
|||
var CssMode = require("./css").Mode;
|
||||
|
||||
var PhpMode = function(opts) {
|
||||
this.inlinePhp = opts && opts.inline;
|
||||
var HighlightRules = this.inlinePhp ? PhpLangHighlightRules : PhpHighlightRules;
|
||||
this.HighlightRules = HighlightRules;
|
||||
this.HighlightRules = PhpLangHighlightRules;
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.$behaviour = new CstyleBehaviour();
|
||||
this.foldingRules = new CStyleFoldMode();
|
||||
|
|
@ -100,7 +98,11 @@ oop.inherits(PhpMode, TextMode);
|
|||
this.$id = "ace/mode/php-inline";
|
||||
}).call(PhpMode.prototype);
|
||||
|
||||
var Mode = function() {
|
||||
var Mode = function(opts) {
|
||||
if (opts && opts.inline) {
|
||||
PhpMode.call(this);
|
||||
return;
|
||||
}
|
||||
HtmlMode.call(this);
|
||||
this.HighlightRules = PhpHighlightRules;
|
||||
this.createModeDelegates({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue