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

feat: inline comment tag #514

Merged
merged 5 commits into from
Jul 7, 2022
Merged

feat: inline comment tag #514

merged 5 commits into from
Jul 7, 2022

Conversation

jg-rp
Copy link
Contributor

@jg-rp jg-rp commented Jul 2, 2022

This pull request implements the inline comment tag, as found in Ruby Liquid version 5.4.0. At the time of writing, Ruby Liquid version 5.4.0 is "unreleased", but inline comments are already available in Shopify store templates.

Inline comments look like this:

{% # This is a comment %}
{%-
  # Comments can span multiple lines,
  # but every line must start with a hash.
-%}

And inside liquid tags:

{% liquid
  # This is a comment
  echo "Hello"
%}

You might also be interested in this modified Prism language definition for Liquid.

@coveralls
Copy link

coveralls commented Jul 2, 2022

Pull Request Test Coverage Report for Build 2605659606

  • 10 of 10 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2601600709: 0.0%
Covered Lines: 2101
Relevant Lines: 2101

💛 - Coveralls

src/parser/tokenizer.ts Outdated Show resolved Hide resolved
@harttle
Copy link
Owner

harttle commented Jul 2, 2022

We'll need to add docs for this tag and website sidebar. I can help update the zh-cn translation.

@jg-rp
Copy link
Contributor Author

jg-rp commented Jul 2, 2022

We'll need to add docs for this tag and website sidebar. I can help update the zh-cn translation.

I'll have a go at docs for this tag within the next day or two.

@harttle harttle merged commit 2f87708 into harttle:master Jul 7, 2022
@jg-rp jg-rp deleted the inlinecomment branch July 7, 2022 17:56
github-actions bot pushed a commit that referenced this pull request Jul 7, 2022
# [9.38.0](v9.37.0...v9.38.0) (2022-07-07)

### Bug Fixes

* stack overflow on large number of templates, [#513](#513) ([3dc4290](3dc4290))

### Features

* inline comment tag ([#514](#514)) ([2f87708](2f87708))
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

🎉 This PR is included in version 9.38.0 🎉

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

Successfully merging this pull request may close these issues.

None yet

3 participants