---
title: SpaceInsideBraces
description: Identifies inconsistent spacing inside Liquid tags and variables.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/space-inside-braces
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/space-inside-braces.md
api_name: liquid
---

# Space​Inside​Braces

**Deprecated:**

This check only exists in Theme Check `v1.X.X`. We consider this to be [the formatter](https://shopify.dev/docs/storefronts/themes/tools/liquid-prettier-plugin)'s job.

Identifies inconsistent spacing inside Liquid tags and variables. Consistent spacing makes your code easier to search, read, and maintain.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

```liquid
<!-- Around braces -->
{% assign x = 1%}
{{ x}}
{{x }}
<!-- After commas and semicolons -->
{% form 'type',  object, key:value %}
{% endform %}
<!-- Around filter pipelines -->
{{ url  | asset_url | image_tag }}
{% assign my_upcase_string = "Hello world"| upcase %}
<!-- Around symbol operators -->
{%- if target  == product and product.price_varies -%}
{%- if product.featured_media.width >=165 -%}
```

### ✓ Pass

```liquid
{% assign x = 1 %}
{{ x }}
{% form 'type', object, key: value, key2: value %}
{% endform %}
{{ "ignore:stuff,  indeed" }}
{% render 'product-card',
  product_card_product: product_recommendation,
  show_vendor: section.settings.show_vendor,
  media_size: section.settings.product_recommendations_image_ratio,
  center_align_text: section.settings.center_align_text
%}
{{ url | asset_url | image_tag }}
{% assign my_upcase_string = "Hello world" | upcase %}
{%- if target == product and product.price_varies -%}
{%- if product.featured_media.width >= 165 -%}
```

***

## Auto-correction

Theme Check can correct this error using the `--auto-correct` flag. When the flag is specified, Theme Check trims or add spaces around `{{ ... }}`.

### Before correction

```liquid
{{ x}}
{{x}}
{{  x  }}
```

### After correction

```liquid
{{ x }}
```

***

## Disabling this check

This check is safe to [disable](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration).

***
