Skip to content

Support for ??? "Empty Coalesce" operator #47

@kylecotter

Description

@kylecotter

Hi,

I'm using this with Craft CMS Twig templating and am curious how I'd go about circumventing a syntax error with the ??? operator.

I use this plugin, which it itself is based on a PR pending on the Twig repo, quite a bit.

When compiling with Prettier I get Error: ERROR: Unexpected token "?" of value "?" which occurs as an example, within a conditional such as {% if foo ??? bar %}

Obviously, it's right to throw an error as it isn't official Twig markup, but was wondering if there was a way to get past that.

Thanks a bunch for your work on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions