Lines Matching full:lines
39 /** @var array<int, string> Buffer for paragraph lines before they are flushed */
46 * followed by any lines, and ending with '---' or '...'.
54 $lines = explode("\n", $markdown);
55 if (count($lines) === 0) {
59 // Trim leading empty lines to find the first non-empty line
61 while ($firstNonEmpty < count($lines) && trim($lines[$firstNonEmpty]) === '') {
66 if ($firstNonEmpty < count($lines) && trim($lines[$firstNonEmpty]) === '---') {
69 for ($i = $firstNonEmpty + 1; $i < count($lines); $i++) {
70 if (trim($lines[$i]) === '---' || trim($lines[$i]) === '...') {
75 // If we found a closing delimiter, remove all lines from start to end (inclusive)
77 $lines = array_slice($lines, $endLine + 1);
78 return implode("\n", $lines);
98 $lines = explode("\n", str_replace(["\r\n", "\r", "\t"], ["\n", "\n", " "], $markdown));
103 while ($i < count($lines)) {
104 $line = $lines[$i];
105 $nextLine = $i + 1 < count($lines) ? $lines[$i + 1] : null;
121 $this->parseTable($lines, $i);
222 * @param string[] $lines The whole array of lines.
225 private function parseTable(array $lines, int &$i): void argument
227 $headerLine = $lines[$i++];
228 $separatorLine = $lines[$i++];
242 …while ($i < count($lines) && strpos($lines[$i], '|') !== false && !preg_match('/^[\s\|:\-]+$/', $l…
243 $this->tableRows[] = $this->parseTableRow($lines[$i]);
426 * Flush any buffered paragraph lines to the output.