harrydeluxe / php-liquid

A PHP port of Ruby's Liquid Templates
http://www.delacap.com/artikel/Liquid-Templates/
MIT License
239 stars 119 forks source link

White space control as default #58

Open ghost opened 5 years ago

ghost commented 5 years ago
    /* Force whitespace control to be used by switching tags from {%- to {%
     * Also, will error out if you try {%- 
     * Need to figure out how to turn back on whitespaces with {%@ errors! not important...
     * Sorry, not an REGEX guy... wanted to use plus sign but it was escaping oddly even with an slash
     */
    \Liquid\Liquid::set('TAG_START', '(?:{%@)|\s*{%');
    \Liquid\Liquid::set('TAG_END', '(?:@%}|%}\s*)');