Open
Description
Curly brackets ({
and }
) tend to mess up indentation when pasted or typed in a zephir file.
For these examples, all code can be pasted inside an empty class to provide one level of indentation.
class Test
{
// here
}
In the following snippets, the curly brackets and the code in between gets a wrong indentation level:
Pasted code:
function abc()
{
}
Result:
class Test
{
function abc()
{
}
}
Pasted code:
if a == b
{
}
Result:
class Test
{
if a == b
{
}
}
Pasted code:
loop
{
}
Result:
class Test
{
loop
{
}
}
However, if brackets are used in an if construct, the indentation level is as expected:
Pasted code:
if(a == b)
{
}
Result:
class Test
{
if(a == b)
{
}
}
Metadata
Metadata
Assignees
Labels
No labels