[ 
https://issues.apache.org/jira/browse/GROOVY-7766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15169078#comment-15169078
 ] 

dariusan commented on GROOVY-7766:
----------------------------------

{code}
$/first line \${''}
second line
/$
{code}

this seems to work, but does really have to be this ugly? Do you really want to 
favour continuation of the current line in a multi line String instead of 
having a backslash before a new line? Or is there any other solution?

> Dollar Slashy String swallows new line
> --------------------------------------
>
>                 Key: GROOVY-7766
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7766
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.5
>            Reporter: dariusan
>
> {code}
> //slash with space near newline works
> assert ' \\ \n '.bytes==$/ \ 
>  /$.bytes
> // slash next to newline will be swallowed
> assert ' \\\n '.bytes==$/ \
>  /$.bytes
> Assertion failed: 
> assert ' \\\n '.bytes==$/ \ /$.bytes
>                 |    |         |
>                 |    false     [32, 32]
>                 [32, 92, 10, 32]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to