Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(view-nunjucks): add autoescape config && add ts interface (#2148)
- Loading branch information
Showing
3 changed files
with
71 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
export interface INunjucksConfig { | ||
/** | ||
* controls if output with dangerous characters are escaped automatically. | ||
*/ | ||
autoescape: boolean; | ||
/** | ||
* throw errors when outputting a null/undefined value | ||
*/ | ||
throwOnUndefined: boolean; | ||
/** | ||
* automatically remove trailing newlines from a block/tag | ||
*/ | ||
trimBlocks: boolean; | ||
/** | ||
* automatically remove leading whitespace from a block/tag | ||
*/ | ||
lstripBlocks: boolean; | ||
/** | ||
* use a cache and recompile templates each time. false in local env. | ||
*/ | ||
cache: boolean; | ||
/** | ||
* defines the syntax for nunjucks tags. | ||
*/ | ||
tags?: { | ||
blockStart?: string; | ||
blockEnd?: string; | ||
variableStart?: string; | ||
variableEnd?: string; | ||
commentStart?: string; | ||
commentEnd?: string; | ||
}; | ||
}; |