1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-03-27 21:23:10 +08:00
parent 00761617e8
commit aeef98d18b
2 changed files with 2 additions and 1 deletions

View File

@ -250,3 +250,4 @@ Volcanos("date", { // @1900-2100区间内的公历转农历
'7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35', '7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35',
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'], '7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'],
}) })
Volcanos("page", {trans: function(can, text) { return can.base.replaceAll(text, "<", "&lt;", ">", "&gt;") }})

View File

@ -275,7 +275,7 @@ Volcanos(chat.ONSYNTAX, {_init: function(can, msg, cb) {
}, can.ui._content.parentNode) }, can.ui._content.parentNode)
}, },
_parse: function(can, line) { _parse: function(can, line) {
function wrap(text, type) { return can.page.Format(html.SPAN, text, type) } function wrap(text, type) { return can.page.Format(html.SPAN, can.page.trans(can, text), type) }
var p = can.onsyntax[can.db.parse]||{}; p = can.onsyntax[p.link]||p, p.split = p.split||{} var p = can.onsyntax[can.db.parse]||{}; p = can.onsyntax[p.link]||p, p.split = p.split||{}
if (p.prefix && can.core.Item(p.prefix, function(pre, type) { if (can.base.beginWith(line, pre)) { return line = wrap(line, type) } }).length > 0) { return line } if (p.prefix && can.core.Item(p.prefix, function(pre, type) { if (can.base.beginWith(line, pre)) { return line = wrap(line, type) } }).length > 0) { return line }
if (p.suffix && can.core.Item(p.suffix, function(end, type) { if (can.base.endWith(line, end)) { return line = wrap(line, type) } }).length > 0) { return line } if (p.suffix && can.core.Item(p.suffix, function(end, type) { if (can.base.endWith(line, end)) { return line = wrap(line, type) } }).length > 0) { return line }