Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

Heredoc string w/ nested interpolation causes indentation error #456

@aseemk

Description

@aseemk

This code snippet...

results = DB.cypher
    query: """
        MATCH (node:#{TEST_LABEL})
        WHERE #{(
            # NOTE: Cypher doesn’t support directly comparing nodes and
            # property bags, so we have to compare each property.
            for prop of properties
                "node.#{prop} = {properties}.#{prop}"
        ).join ' AND '}
        RETURN node
    """
    params: {properties}
, _

...produces an indentation error on the for prop of properties line: "Expected 4 got 12." My value is set to 4.

(It also causes a no_unnecessary_double_quotes on the ).join ' AND '} line, which ironically has no double quotes, but looks like this syntax in general may be unsupported from #368.)

Not sure if this is the same root cause as #332 (indentation error from non-heredoc multi-line string).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions