Avoid unnecessary line indentation calculation.
This commit is contained in:
parent
d5aca818b2
commit
5e9f41eef4
@ -312,7 +312,9 @@ class Parser
|
||||
$removeComments = !preg_match($removeCommentsPattern, $this->currentLine);
|
||||
|
||||
while ($this->moveToNextLine()) {
|
||||
if ($this->getCurrentLineIndentation() === $newIndent) {
|
||||
$indent = $this->getCurrentLineIndentation();
|
||||
|
||||
if ($indent === $newIndent) {
|
||||
$removeComments = !preg_match($removeCommentsPattern, $this->currentLine);
|
||||
}
|
||||
|
||||
@ -329,8 +331,6 @@ class Parser
|
||||
continue;
|
||||
}
|
||||
|
||||
$indent = $this->getCurrentLineIndentation();
|
||||
|
||||
if (preg_match('#^(?P<text> *)$#', $this->currentLine, $match)) {
|
||||
// empty line
|
||||
$data[] = $match['text'];
|
||||
|
Reference in New Issue
Block a user