small cleanup
This commit is contained in:
parent
561a426516
commit
a091a627a0
3 changed files with 21 additions and 16 deletions
|
|
@ -1,4 +1,6 @@
|
|||
define(function(require, exports, module) {
|
||||
// LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua
|
||||
// documentation: http://keplerproject.github.com/cgilua/manual.html#templates
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
|
|
@ -8,7 +10,7 @@ var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
|
|||
var LuaPageHighlightRules = function() {
|
||||
this.$rules = new HtmlHighlightRules().getRules();
|
||||
|
||||
for (var i in this.$rules){ // Thanks to Harutyun Amirjanyan for this fix.
|
||||
for (var i in this.$rules) {
|
||||
this.$rules[i].unshift({
|
||||
token: "keyword",
|
||||
regex: "<\\%\\=?",
|
||||
|
|
@ -20,17 +22,17 @@ var LuaPageHighlightRules = function() {
|
|||
});
|
||||
}
|
||||
this.embedRules(LuaHighlightRules, "lua-", [
|
||||
{
|
||||
token: "keyword",
|
||||
regex: "\\%>",
|
||||
next: "start"
|
||||
},
|
||||
{
|
||||
token: "keyword",
|
||||
regex: "\\?>",
|
||||
next: "start"
|
||||
}
|
||||
]);
|
||||
{
|
||||
token: "keyword",
|
||||
regex: "\\%>",
|
||||
next: "start"
|
||||
},
|
||||
{
|
||||
token: "keyword",
|
||||
regex: "\\?>",
|
||||
next: "start"
|
||||
}
|
||||
]);
|
||||
};
|
||||
|
||||
oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue