Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colon not allowed in date format string? #64

Open
sml1990 opened this issue Sep 3, 2020 · 1 comment
Open

Colon not allowed in date format string? #64

sml1990 opened this issue Sep 3, 2020 · 1 comment

Comments

@sml1990
Copy link

sml1990 commented Sep 3, 2020

Hello,

It seems as though {{ "now" | date: "%Y-%m-%d %H:%M" }} renders null but {{ "now" | date: "%Y-%m-%d %H%M" }} renders just fine. Is anyone else having this issue? It seems that the colon is causing it to render null.

@sml1990
Copy link
Author

sml1990 commented Sep 3, 2020

It seems that if you change the following within /src/Liquid.php, it fixes the problem.

Change:
'QUOTED_STRING_FILTER_ARGUMENT' => '"[^":]"|'[^\':]'',

To:
'QUOTED_STRING_FILTER_ARGUMENT' => '"[^"]"|'[^\']'',

Does anyone know the details of the original pattern and why it was used? While this seems to have solved the colon issue, I haven't yet done enough testing to see if the new pattern causes other problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant