Use a bracket to separate the handlebars. Please check the following for an example
{{#if line_items.0.properties.0.value }}{{#contains line_items.0.properties.0.value "Pre Order"}} {{dateFormat 'MM/DD/YYYY' (replace line_items.0.properties.0.value "Pre Order | Due In " '') 'DD/MM/YYYY'}}{{/contains}}{{/if}}