Skip to content

Commit

Permalink
fix(twig.gen): inject old doc was broken for new file
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 25, 2018
1 parent 25fbc5d commit 813204e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generator/TwigGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function generateDocs(array $docsMetadata, array $parameters): int
return (int) $this->pathUtil->writeFile($targetFile, $docContent);
}

if (\strpos($oldContent, '<!-- DOCS START -->')) {
if (\strpos($oldContent, '<!-- DOCS START -->') !== false) {
$docContent = \preg_replace('~<!-- DOCS START -->.*?<!-- DOCS END -->~s', $docContent, $oldContent);

return (int) $this->pathUtil->writeFile($targetFile, $docContent);
Expand Down

0 comments on commit 813204e

Please sign in to comment.