language-ethereum
language-ethereum copied to clipboard
Extra level of indentation after close of conditional block
Steps to reproduce:
- In Atom with language-ethereum installed, create a new
MyContract.solfile. - Write or paste code like the following:
pragma solidity ^0.4.24;
contract MyContract {
uint private winningNumber;
function isAWinner(uint entryNum) public view returns (bool) {
if(entryNum == winningNumber) {
return true;
//Everything below this line is auto-indented one level too many.
} else {
uint secondChance = entryNum*entryNum;
return (secondChance == winningNumber);
}
}
}
- Select All.
- Auto-indent.
Expected behavior: Code formatted like the above (when a tab is set to 4 spaces).
Actual behavior: All lines after the comment are indented one level to the right of where they should be.
Other notes: The indentation works fine if the file is renamed to have a .js extension, because a different package applies.