trivago / prettier-plugin-twig-melody

Code formatting plugin for Prettier which can handle Twig/Melody templates
Apache License 2.0
155 stars 35 forks source link

Didn't works with ??? operator #95

Open davidhellmann opened 2 years ago

davidhellmann commented 2 years ago

Hey,

great plugin but it looks like it has problems with the ??? Operator. It's an extension: https://plugins.craftcms.com/empty-coalesce but maybe you can add it. If one of this Operators in the file there is no formatting at all. If I switch to ?? Operator it works fine again.

WORKS

{{ include('_builders/_builderContent.twig', {
        props: {
          blocks: entry.contentBuilder ?? null
        }
      }, withContext = false) }}

WORKS NOT

{{ include('_builders/_builderContent.twig', {
        props: {
          blocks: entry.contentBuilder ??? null
        }
      }, withContext = false) }}