Skip to content

When I format Liquid code with Shopify Liquid then it is replaced with empty code #1004

@mdarifulislamroni521

Description

@mdarifulislamroni521

Describe the bug

When I format Liquid code using the Shopify Liquid formatter, the code is replaced with an empty block. This happens consistently and removes all the Liquid content. Please check the attached video for a demonstration of the issue.

Source

{% if product.available %}

{{ product.title }} is available.

{% endif %}

Expected behaviour

The Liquid code should be formatted cleanly and preserved—without removing or emptying it. I expect indentation or spacing fixes, but not code deletion.

Actual behaviour

When I run the formatter (e.g., via VS Code or CLI), it removes all the code, leaving the file or snippet completely empty.

Debugging information

OS: Mac

OS Version: macOS 10.15.7

Theme Check Version: 1.15.0

Shopify Liquid Formatter: Shopify.theme-check-vscode

Additional context
When I format Liquid code with Shopify Liquid then it is replaced with empty code

2025-06-28.11-38-08.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions