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

Test invalid floats without integer parts #1343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peterzhu2118
Copy link
Member

Add tests for Shopify/liquid-c#120.

@dylanahsmith
Copy link
Contributor

Based on Shopify/liquid-c#123, it looks like we actually have themes that depend on this liquid quirk.

We might want to consider just supporting that syntax. It isn't actually that unreasonable. For example, it is valid syntax in python

$ python
Python 3.10.3 (main, Jul  4 2022, 12:12:23) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> -.1
-0.1

It is also considered acceptable syntax in math, even though the 0 preceding the decimal point is typically preferred for readability.

@ghost
Copy link

ghost commented Oct 31, 2022 via email

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

Successfully merging this pull request may close these issues.

4 participants