1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Remove redundant checks

These don't appear to have a measurable positive impact on performance.
This commit is contained in:
Aidan Woods
2019-02-10 17:49:26 +00:00
parent 41fb6b0d43
commit 36fac49ed8
8 changed files with 11 additions and 33 deletions

View File

@@ -65,10 +65,7 @@ final class BlockQuote implements ContinuableBlock
return null;
}
if (
\substr($Context->line()->text(), 0, 1) === '>'
&& \preg_match('/^(>[ \t]?+)(.*+)/', $Context->line()->text(), $matches)
) {
if (\preg_match('/^(>[ \t]?+)(.*+)/', $Context->line()->text(), $matches)) {
$indentOffset = $Context->line()->indentOffset() + $Context->line()->indent() + \strlen($matches[1]);
$recoveredSpaces = 0;