Possible bug folding PHP heredocs-style strings


#1

On the images below there is a function in PHP that I fold -clicking on the little v sign on the right of the line number- resulting on the second image.

The problem is that the folding stops at the word “HEREDOC” because it is on the first column and leave the rest of the function unfolded. But the “HEREDOC” has to be there because of PHP syntax.

Unfolded:

Folded:

Is there a way to fix this?

Regards.
D. Mayr


#2

Yeah, this looks like a bug. Please report this as an issue on https://github.com/atom/language-php/issues and post a link to the Issue here.


#3

Sure, here it is: https://github.com/atom/language-php/issues/78

Also, should I always post bugs directly there or discuss them here first?
I think that there is another one about syntax highlighting with html and php…


#4

The decision on whether to post here on Discuss or as an Issue is sometimes a murky one. Basically, if you’re certain it is a bug, you have repro steps and you know how the application should be behaving , then posting an Issue is probably best. If you’re not sure it is a bug, you can’t really reproduce it or especially if you don’t have a suggestion for a better way for the program to behave, then it is best to post here so it can be discussed, reproduced and an approach considered.


#5

Makes sense. I’ll keep posting here when I’m not 100% sure about the bug.

Thanks.


#6

Also, on line 5 only the first “<” has the green color (I think that would make more sense if every one were green or all of them were white).

I don’t know if it is the expected result, does someone know something about it?
It isn’t really annoying or anything, but I believe that we can improve/fix it. :smile: