Skip to content

Commit

Permalink
docs: add acknowledgment for borrowed code
Browse files Browse the repository at this point in the history
  • Loading branch information
theotheo committed Oct 23, 2023
1 parent d4ef1a5 commit 0363b67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bbt/template.env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0363b67

Please sign in to comment.