erb constant

LiquidConfig const erb

ERB-style delimiters.

Uses <% %> for tags and <%= %> for variable output, similar to Ruby's ERB templating system.

final liquid = Liquid(config: LiquidConfig.erb);
final template = liquid.parse('<% if user %>Hello <%= name %>!<% endif %>');
print(template.render({'user': true, 'name': 'World'})); // Hello World!

Implementation

static const erb = LiquidConfig(
  tagStart: '<%',
  tagEnd: '%>',
  varStart: '<%=',
  varEnd: '%>',
);