panoply / vscode-liquid

💧Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
171 stars 23 forks source link

Formatting problems with output values in html tag. #188

Closed epver closed 1 month ago

epver commented 3 months ago

my config

{
    "liquid": {
      "indentAttribute": false,
      "normalizeSpacing": true,
      "delimiterTrims":"preserve",
      "delimiterPlacement": "consistent"
    }
}

hope format

<meta name="runtime-host" content="{{shop.cdn_domain}}">

futile

panoply commented 3 months ago

Hey @epver

What is the desired outcome you are seeking?

For some context, you may need to add rules to markup as the liquid formatting logic only pertains to Liquid syntax. I'm unsure of what you would like based on your example, if you can be a little more detailed, I'll be able to point you in the right direction.

epver commented 3 months ago

I need like this

<meta name="keywords" content="{{ page_keyword |   default: shop.name | escape }}">
<meta name="description" content="{{page_description | default: shop.name | escape | truncatebytes: 320, "" }}">
<meta content="on" http-equiv="x-dns-prefetch-control">
<meta name="runtime-host" content="{{shop.cdn_domain}}cuttlefish/2022101221">
<link href="{{    shop.cdn_domain }}" rel="dns-prefetch">
<link href="{{   shop.cdn_domain }}" rel="preconnect">

format to

<meta name="keywords" content="{{ page_keyword | default: shop.name | escape }}">
<meta name="description" content="{{ page_description | default: shop.name | escape | truncatebytes: 320, "" }}">
<meta content="on" http-equiv="x-dns-prefetch-control">
<meta name="runtime-host" content="{{ shop.cdn_domain }}cuttlefish/2022101221">
<link href="{{ shop.cdn_domain }}" rel="dns-prefetch">
<link href="{{ shop.cdn_domain }}" rel="preconnect">
panoply commented 1 month ago

Æsthetic does not touch Liquid contained within strings. This is intentional by design.