mirror of
https://shylinux.com/x/volcanos
synced 2025-05-10 06:38:09 +08:00
opt some
This commit is contained in:
parent
e3bdf13cb5
commit
5eaad3df1d
@ -155,7 +155,13 @@ Volcanos("onsyntax", {help: "语法高亮", list: ["keyword", "prefix", "line"],
|
|||||||
}).join(""))
|
}).join(""))
|
||||||
|
|
||||||
p.prefix && can.core.Item(p.prefix, function(pre, type) {
|
p.prefix && can.core.Item(p.prefix, function(pre, type) {
|
||||||
if (line.trim().indexOf(pre) == 0) { line = wrap(type, line) }
|
if (line.trim().indexOf(pre) == 0) {
|
||||||
|
line = wrap(type, line)
|
||||||
|
} else {
|
||||||
|
var ls = line.split(pre); if (ls.length > 1) {
|
||||||
|
line = ls[0] + wrap(type, pre + ls[1])
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
p.suffix && can.core.Item(p.suffix, function(pre, type) {
|
p.suffix && can.core.Item(p.suffix, function(pre, type) {
|
||||||
if (line.endsWith(pre)) { line = wrap(type, line) }
|
if (line.endsWith(pre)) { line = wrap(type, line) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user