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

Single or double quote breaks comments #628

Closed
lionel-rowe opened this issue Jul 7, 2023 · 1 comment
Closed

Single or double quote breaks comments #628

lionel-rowe opened this issue Jul 7, 2023 · 1 comment

Comments

@lionel-rowe
Copy link

Including a single or double quote (straight versions '") inside a comment causes errors. Minimal examples:

{% # that's %}
{% # "quoted" %}

Error:

tag "{% # that's %}\r\n" not closed, line:1, col:1
>> 1| {% # that's %}
      ^
   2| 
TokenizationError: tag "{% # that's %}\r\n" not closed, line:1, col:1

Removing or replacing them with curly equivalents (‘’“”) fixes the error.

Example from Shopify Liquid docs that also breaks due to apostrophe inside the comment:

{% liquid
  # Show a message that's customized to the product type

  assign product_type = product.type | downcase
  assign message = ''

  case product_type
    when 'health'
      assign message = 'This is a health potion!'
    when 'love'
      assign message = 'This is a love potion!'
    else
      assign message = 'This is a potion!'
  endcase

  echo message
%}
@harttle harttle added the bug label Jul 7, 2023
@harttle harttle closed this as completed in bf425c3 Jul 7, 2023
github-actions bot pushed a commit that referenced this issue Jul 7, 2023
## [10.8.4](v10.8.3...v10.8.4) (2023-07-07)

### Bug Fixes

* allow quotes in inline comment tag, fixes [#628](#628) ([bf425c3](bf425c3))
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

🎉 This issue has been resolved in version 10.8.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants