Skip to content

Commit

Permalink
fix getting conditionsInCode
Browse files Browse the repository at this point in the history
  • Loading branch information
chervyakovru authored and yndx-birman committed Nov 1, 2022
1 parent 13792e5 commit bbaa404
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transform/utilsFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type GetFileTokensOpts = {
disableTitleRefSubstitution?: boolean;
disableCircularError?: boolean;
inheritVars?: boolean;
conditionsInCode?: boolean;
};

export function getFileTokens(path: string, state: StateCore, options: GetFileTokensOpts) {
Expand All @@ -45,6 +46,7 @@ export function getFileTokens(path: string, state: StateCore, options: GetFileTo
disableTitleRefSubstitution,
disableCircularError,
inheritVars = true,
conditionsInCode,
} = options;
let content;

Expand All @@ -62,7 +64,7 @@ export function getFileTokens(path: string, state: StateCore, options: GetFileTo
if (!disableLiquid) {
const liquidResult = liquid(content, builtVars, path, {
withSourceMap: true,
conditionsInCode: vars?.conditionsInCode as boolean | undefined,
conditionsInCode,
});

content = liquidResult.output;
Expand Down

0 comments on commit bbaa404

Please sign in to comment.