feat: add preserveTimezones option

This commit is contained in:
Joonas
2020-12-18 22:03:58 +08:00
committed by Jun Yang
parent 26b217542b
commit d70cd2a1ea
4 changed files with 34 additions and 17 deletions
+4
View File
@@ -37,6 +37,8 @@ export interface LiquidOptions {
outputDelimiterLeft?: string;
/** The right delimiter for liquid outputs. **/
outputDelimiterRight?: string;
/** Whether input strings to date filter preserve the given timezone **/
preserveTimezones?: boolean;
/** Whether `trim*Left`/`trim*Right` is greedy. When set to `true`, all consecutive blank characters including `\n` will be trimed regardless of line breaks. Defaults to `true`. */
greedy?: boolean;
/** `fs` is used to override the default file-system module with a custom implementation. */
@@ -69,6 +71,7 @@ export interface NormalizedFullOptions extends NormalizedOptions {
tagDelimiterRight: string;
outputDelimiterLeft: string;
outputDelimiterRight: string;
preserveTimezones: boolean;
greedy: boolean;
globals: object;
keepOutputType: boolean;
@@ -89,6 +92,7 @@ export const defaultOptions: NormalizedFullOptions = {
tagDelimiterRight: '%}',
outputDelimiterLeft: '{{',
outputDelimiterRight: '}}',
preserveTimezones: false,
strictFilters: false,
strictVariables: false,
lenientIf: false,