fix inline php mode

This commit is contained in:
nightwing 2014-10-31 15:08:44 +04:00
commit 366675a7a7
2 changed files with 71 additions and 4 deletions

View file

@ -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({