LiquidEngine.(constructor)
Constructs a Liquid engine instance with xpm-specific settings and filters.
Signature
constructor(input?: {
platformDetector?: PlatformDetector;
options?: liquidjs.LiquidOptions;
});
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
{ platformDetector, options, } |
(not declared) |
(Optional) |
|
input |
{ platformDetector?: PlatformDetector; options?: liquidjs.LiquidOptions; } |
(Optional) |
Remarks
The constructor configures strict parsing options and registers filters for path handling, formatting, and list operations.
Configuration options:
- strictFilters: Throw errors for undefined filters rather than silently ignoring them.
- strictVariables: Throw errors for undefined variables rather than rendering empty strings.
- trimTagLeft/Right: Preserve whitespace around template tags.
- trimOutputLeft/Right: Preserve whitespace around output expressions.
- greedy: Use non-greedy matching for better template compatibility.
- lenientIf: Allow flexible truthiness in conditional expressions.
Filter registration:
- Platform-aware path filters (default, posix, win32): delegate to Node.js path module for consistent cross-platform behavior.
- Custom filters (to\_filename, join\_lines, split\_lines, keys): provide template-specific functionality not available in standard Liquid.
- All filters are registered during construction for immediate availability in templates.
Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.