Sfoglia il codice sorgente

Ensure we clean out `No-example` from the description tet we render

Marnu Lombard 5 anni fa
parent
commit
47558ce979
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/Tools/Generator.php

+ 2 - 0
src/Tools/Generator.php

@@ -132,6 +132,7 @@ class Generator
             })
             ->mapWithKeys(function ($tag) {
                 preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content);
+                $content = preg_replace('/\s?No-example.?/', '', $content);
                 if (empty($content)) {
                     // this means only name and type were supplied
                     list($name, $type) = preg_split('/\s+/', $tag->getContent());
@@ -207,6 +208,7 @@ class Generator
             })
             ->mapWithKeys(function ($tag) {
                 preg_match('/(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content);
+                $content = preg_replace('/\s?No-example.?/', '', $content);
                 if (empty($content)) {
                     // this means only name was supplied
                     list($name) = preg_split('/\s+/', $tag->getContent());