Skip to content

formatting of here strings results in syntax error. #32

Closed
@masukomi

Description

@masukomi

given the following code, the trailing HERE that closes the "here string" will not be left on a line by itself. Instead the paren after it will be moved up, which makes the HERE not end the string, which makes a syntax error for the rest of the file.

The temporary workaround is to add a comment on a line AFTER the end of string indicator and before the next parentheses.

(string->jsexpr
    #<<HERE
 {
  "foo": "bar"
}
HERE
    )

that gets transformed to end with HERE) which breaks things.

To workaround the problem:

(string->jsexpr
    #<<HERE
 {
  "foo": "bar"
}
HERE
; formatter break
    )

the expected/correct behavior is to leave the closing of the here string on the line by itself and then on the following line close/open any parentheses at the same level of indentation that the "here string" began at.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions