From 0363b67921f37044712b4a3540589a5e905c9cd4 Mon Sep 17 00:00:00 2001 From: theotheo Date: Mon, 23 Oct 2023 20:00:48 +0300 Subject: [PATCH] docs: add acknowledgment for borrowed code --- src/bbt/template.env.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bbt/template.env.ts b/src/bbt/template.env.ts index d0039bd..50082b0 100644 --- a/src/bbt/template.env.ts +++ b/src/bbt/template.env.ts @@ -277,6 +277,7 @@ export const template = new nunjucks.Environment(loader as any, { autoescape: false, }); +// The following code has been borrowed from the discussion at https://github.com/mozilla/nunjucks/issues/313 template.addFilter('setAttribute', function(dictionary, key: any, value: any) { dictionary[key] = value; return dictionary;