Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Prettier formatting of Liquid markup #5

Closed
18 tasks done
charlespwd opened this issue May 25, 2022 · 0 comments
Closed
18 tasks done

Prettier formatting of Liquid markup #5

charlespwd opened this issue May 25, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@charlespwd
Copy link
Collaborator

charlespwd commented May 25, 2022

A TODO that we're solving post dev-preview, since I would like to open a discussion about the rules.

Problem

The insides of LiquidDrop and LiquidTag are not formatted yet:

Input:

{%render 'foo',arg1:product,arg2:product%}

Expected Output:

{% # with printWidth: 80 %}
{% render 'foo', arg1:product, arg2:product %}

{% # with printWidth: 1, not sure yet if we indent args or not. Might be good GitHub discussion. %}
{% 
  render 'foo', 
  arg1: product, 
  arg2: product 
%}

Temporary fix

Don't format at all other than adding leading/trailing whitespace to the tag.

{% render 'foo',arg1:product,arg2:product %}

TODO

This is going to be a big change. Better to split it into smaller chunks.

@charlespwd charlespwd added the enhancement New feature or request label May 27, 2022
@charlespwd charlespwd self-assigned this Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant