create separate html mode
This commit is contained in:
parent
8a6bfe2d24
commit
da1a45f694
3 changed files with 73 additions and 24 deletions
|
|
@ -44,9 +44,7 @@ var CssMode = require("./css").Mode;
|
|||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
|
||||
var MixedFoldMode = require("./folding/mixed").FoldMode;
|
||||
var XmlFoldMode = require("./folding/xml").FoldMode;
|
||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||
var HtmlFoldMode = require("./folding/html").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new HtmlHighlightRules();
|
||||
|
|
@ -59,27 +57,7 @@ var Mode = function() {
|
|||
"css-": CssMode
|
||||
});
|
||||
|
||||
this.foldingRules = new MixedFoldMode(new XmlFoldMode({
|
||||
"area": 1,
|
||||
"base": 1,
|
||||
"br": 1,
|
||||
"col": 1,
|
||||
"command": 1,
|
||||
"embed": 1,
|
||||
"hr": 1,
|
||||
"img": 1,
|
||||
"input": 1,
|
||||
"keygen": 1,
|
||||
"link": 1,
|
||||
"meta": 1,
|
||||
"param": 1,
|
||||
"source": 1,
|
||||
"track": 1,
|
||||
"wbr": 1
|
||||
}), {
|
||||
"js-": new CStyleFoldMode(),
|
||||
"css-": new CStyleFoldMode()
|
||||
});
|
||||
this.foldingRules = new HtmlFoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue