mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: template: use builtin nl2br
This commit is contained in:
1 parent
dc7d53b59c
commit
ff096322fc
3 files changed
+9
-10
No files matched your search
@@ -77,7 +77,6 @@ class Nunjucks extends nunjucks.Environment {
|
||||
this.addFilter('base64_decode', (s) => Buffer.from(s, 'base64').toString());
|
||||
this.addFilter('jsesc', (self) => jsesc(self, { isScriptContext: true }));
|
||||
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