Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting breaks json-ld script blocks #79

Closed
DPangerl opened this issue Oct 19, 2021 · 3 comments
Closed

Formatting breaks json-ld script blocks #79

DPangerl opened this issue Oct 19, 2021 · 3 comments
Assignees
Labels
🎀 Æsthetic The issue pertains to Æsthetic

Comments

@DPangerl
Copy link

I'm working with the shopify default dawn theme and there are some microdata blocks in the header.liquid.
If i try to format the document, everything seems to work fine, but the json-ld blocks are broken afterwards.

It goes from:


<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "name": {{ shop.name | json }},
      {% if section.settings.logo %}
        {% assign image_size = section.settings.logo.width | append: 'x' %}
        "logo": {{ section.settings.logo | img_url: image_size | prepend: "https:" | json }},
      {% endif %}
      "sameAs": [
        {{ settings.social_twitter_link | json }},
        {{ settings.social_facebook_link | json }},
        {{ settings.social_pinterest_link | json }},
        {{ settings.social_instagram_link | json }},
        {{ settings.social_tiktok_link | json }},
        {{ settings.social_tumblr_link | json }},
        {{ settings.social_snapchat_link | json }},
        {{ settings.social_youtube_link | json }},
        {{ settings.social_vimeo_link | json }}
      ],
      "url": {{ shop.url | append: page.url | json }}
    }
  </script>

to


<script type="application/ld+json">

�[36mLine: 1�[0m
�[31m�[36 mLine : 1 �[�[0m
�[31m        0 m �[�[0m
�[31m            31 m {�[0m
�[31m                �[�[0m
�[31m                    0 m �[�[0m
�[31m                        31 m "@context" : "http://schema.org",�[0m
�[31m                        �[�[0m
</script>

I've copied this block in a blank liquid file… same problem.

Is there any way, to exclude formatting those blocks?
Or can i adjust some other setting?

If you need further information, just ask.
Thanks for the otherwise great extension 👍

@pinguluk
Copy link

pinguluk commented Dec 9, 2021

+1

@panoply
Copy link
Owner

panoply commented Feb 5, 2022

#38 is a temporary workaround for this.

@panoply panoply self-assigned this Feb 5, 2022
@panoply panoply added 💧Liquify Features shipping in Liquify PrettyDiff Bug labels Feb 5, 2022
@panoply panoply added this to the Liquify milestone Feb 11, 2022
@panoply panoply added v3.0.0 🎀 Æsthetic The issue pertains to Æsthetic and removed PrettyDiff Bug 💧Liquify Features shipping in Liquify labels Sep 25, 2022
@panoply panoply removed this from the Liquify milestone Sep 25, 2022
@panoply
Copy link
Owner

panoply commented Sep 28, 2022

🚢 Shipped v3.0.0

@panoply panoply closed this as completed Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎀 Æsthetic The issue pertains to Æsthetic
Projects
None yet
Development

No branches or pull requests

3 participants