Lines Matching +full:- +full:m
6 * Parses cmark-gfm's `test/spec.txt` fenced-example format.
17 * optionally followed by a whitespace-separated label (used by the GFM
33 $this->path = $path;
49 if (!is_file($this->path)) {
50 throw new \RuntimeException("spec file not found: {$this->path}");
52 $lines = file($this->path, FILE_IGNORE_NEW_LINES);
54 throw new \RuntimeException("cannot read spec file: {$this->path}");
67 if (preg_match('/^#{1,6}\s+(.*?)\s*#*\s*$/', $raw, $m)) {
68 $section = $m[1];
71 if (preg_match('/^(`{10,})\s+example(?:\s+(\S.*?))?\s*$/', $raw, $m)) {
73 $fenceLen = strlen($m[1]);
74 $extension = isset($m[2]) && $m[2] !== '' ? $m[2] : null;
82 // Close-fence check: same char, same length, line is exactly the fence
83 if (preg_match('/^(`{' . $fenceLen . ',})\s*$/', $raw, $m)
84 && strlen($m[1]) === $fenceLen
112 … "spec file ended mid-example (#$number); opening fence of length $fenceLen was not closed"