Quote Convert

How quotation characters of markup attributes and Liquid tokens should be handled. Allows for conversion to single quotes or double quotes. Markup tag attributes should always use double quotations, it’s the standard in languages like HTML.

When working with Liquid, use single quotes for strings and always infer double in the markup.


🤡

none

Below is an example of how this rule works if set to none which is the default setting. No conversion of quotations is applied when using none and one should consider setting a specific value.


{% if 'some-string' %}

  {{ "string" | filter: 'string' }}

  {% cycle 'one', 'two', "three", "four", 'five' %}

{% endif %}

{% if 'some-string' %}

  {{ "string" | filter: 'string' }}

  {% cycle 'one', 'two', "three", "four", 'five' %}

{% endif %}

👎

double

Below is an example of how this rule works if set to double which will go about converting and ensuring all markup quotations are using doubles.

{% if 'some-string' %}

  {{ 'string' | filter: 'string' }}

  {% cycle 'one', 'two', 'three', 'four', 'five' %}

{% endif %}
{% if 'some-string' %}

  {{ "string" | filter: "string" }}

  {% cycle "one", "two", "three", "four", "five" %}

{% endif %}

🙌

single

Below is an example of how this rule works if set to single which will go about converting and ensuring all markup quotations are using singles.

{% if "some-string" %}

  {{ "string" | filter: "string" }}

  {% cycle "one", "two", "three", "four", "five" %}

{% endif %}
{% if "some-string" %}

  {{ 'string' | filter: 'string' }}

  {% cycle 'one', 'two', 'three', 'four', 'five' %}

{% endif %}