Lines Matching refs:lines
54 $lines = explode("\n", $markdown);
55 if (count($lines) === 0) {
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]) === '...') {
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]);