소스 검색

Fix example/description parsing from validation comments

shalvah 3 년 전
부모
커밋
e3b7dbefc1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Extracting/Strategies/GetFromInlineValidatorBase.php

+ 1 - 1
src/Extracting/Strategies/GetFromInlineValidatorBase.php

@@ -122,7 +122,7 @@ class GetFromInlineValidatorBase extends Strategy
             if ($comments) {
                 $description = trim(str_replace(['No-example.', 'No-example'], '', $comments));
                 $example = null;
-                if (preg_match('/(.*\s+|^)Example:\s*([\s\S]+)\s*/m', $description, $matches)) {
+                if (preg_match('/(.*\s+|^)Example:\s*([\s\S]+)\s*/s', $description, $matches)) {
                     $description = trim($matches[1]);
                     $example = $matches[2];
                 }