mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: contest(OI): 订正模式
This commit is contained in:
1 parent
e70beab967
commit
15827eeabb
7 files changed
+65
-31
No files matched your search
@@ -66,6 +66,7 @@ class Nunjucks extends nunjucks.Environment {
|
||||
this.addFilter('base64_encode', (s) => Buffer.from(s).toString('base64'));
|
||||
this.addFilter('base64_decode', (s) => Buffer.from(s, 'base64').toString());
|
||||
this.addFilter('bitand', (self, val) => self & val);
|
||||
this.addFilter('replaceBr', (self) => self.toString().replace(/\n/g, '<br>'));
|
||||
this.addFilter('toString', (self) => (typeof self === 'string' ? self : JSON.stringify(self, replacer)));
|
||||
this.addFilter('content', (content, language, html) => {
|
||||
let s = '';
|
||||
|
||||
Reference in new issue
Block a user